我想弄清楚javascript文件的执行顺序。下面我有一个例子。告诉我哪条路是正确的。
//JS gets read from top to bottom:
var hello = 6; //JS sees a varaible declared, it stores variable hello in memory
hello = 4; //Then, JS sees a change to var hello, change the value of hello in the same spot of the memory
console.log(hello); //Lastly, JS