Technology

Variable Hoisting In JavaScript

Javascript handles function and variable declartions quite differently and you must have got stuck in one of the awkard scenarios due to it. First of all, you should be familiar with Scoping in JavaScript. If you are, then you would know already that JavaScript only has function scopes and no block scopes. [js] var a = 'hello'; ...

by Sakshi Tyagi
Tag: scopes
12-Oct-2014