July 14, 2016

Understanding ‘this’ in JavaScript

Filed under: Technical — Tags: , , — James Bunton @ 10:27 pm

I believe the behaviour of the this keyword in JavaScript is one of the most confusing and poorly thought out parts of the language. If you understand how objects and classes work in some other language, but don’t understand why JavaScript behaves weirdly, this blog aims to help you out. By the end you’ll understand how this works and how to make it work for you.

(more…)