Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
Selected Reading
Variable Hoisting in JavaScript
When you can use a JavaScript variable before it is declared, it is done using a technique called hoisting. The parser read through the complete function before running it.
The behavior in which a variable appears to be used before it is declared is known as hoisting −
For example, the following,
points =200; var points;
The above works the same like the following −
var points; ponts = 200;
Advertisements
