loading...

re: What is Hoisting😰😰 in JavaScript VIEW POST

FULL DISCUSSION
 

It moves the declaration for var up but not the value set

var value;
console.log(value);
console.log('hi hoisting');
value = 'hoisting';
console.log(value);
 

Yup!

Variable declaration and assignment are done separately.

code of conduct - report abuse