I have a rather general question regarding JavaScript and local variables. My question is what is the difference between the following and if there is any:
funct
Any use of var within a function is hoisted. Subsequent uses on the same variable in the same scope have no effect.
var
It has exactly the same meaning as a = 4; alone.
a = 4;