hoisting #4

node v10.24.1
version: master
endpointsharetweet
// Initialize x in the global scope var x = 100; function hoist() { // A condition that should not affect the outcome of the code if (false) { var x = 200; } console.log(x); } hoist();
Loading…

no comments

    sign in to comment