JavaScript Hoisting Variable

 JavaScript Hoisting Variable

In this article we are goanna to see about Hoisting variable in Javascript and where we use these. which is most important when you are going to start your career in JavaScript. Please read and enjoy this article if you want to give any feedback about your experience, we welcome.



Hoisting is JavaScript's default behavior of moving all declarations to the top of the current scope (to the top of the current script or the current function).




Ex:

var x = 20,
document.write(x + “ ” + y);
var y = 30;

Share:

0 comments

Please leave your comments...... Thanks