JavaScript variables hoisting in details

Variables in a program are everywhere. They are small pieces of data and logic that always interact with each other: and this activity makes the application alive. In JavaScript an important aspect of working with variables is hoisting, which defines when a variable is accessible. If you're looking for a detailed description of this aspect, then you're in the right place. Let's begin. 1. Introduction… Continue reading

Gentle explanation of 'this' keyword in JavaScript

1. The mystery of this A lot of time this keyword was a mystery for me and many starting JavaScript developers. It is a powerful feature, but requires efforts to be understood. From a background like Java, PHP or other standard language, this is seen as an instance of the current object in the class method: no more and no less. Mostly, it cannot be… Continue reading