Hi, great article but I think you have a mistake about the hoisting,you wrote:
"They are all hoisted to the top of their scope but while var varvariables are initialized with undefined, let and const variables are not initialized."
If you will look at the JavaScript Hoisting section in w3schools.com website,
you will notice that:"Variables and constants declared with let or const are not hoisted!"
Please check in: w3schools.com/js/js_hoisting.asp
That's exactly I m thinking the new let and const in javascript are not hoisted..she wrote wrong things..u should correct this article..do not mislead people with this ??
Hi, great article but I think you have a mistake about the hoisting,you wrote:
"They are all hoisted to the top of their scope but while var varvariables are initialized with undefined, let and const variables are not initialized."
If you will look at the JavaScript Hoisting section in w3schools.com website,
you will notice that:"Variables and constants declared with let or const are not hoisted!"
Please check in:
w3schools.com/js/js_hoisting.asp
That's exactly I m thinking the new let and const in javascript are not hoisted..she wrote wrong things..u should correct this article..do not mislead people with this ??
According to MDN and ECMA 2015 her words are right
check this developer.mozilla.org/en-US/docs/W...