In JS, I never really understand and never do the former. Why and when should it be used? How are they different?
It seems to do with Hoisting and Closure?
https://cs3110.github.io/textbook/cover.html
Code:
var pimp = function(colour){console.log("I will eat that " + colour + " ass");}
Code:
function pimp(colour){console.log("I will eat that " + colour + " ass");}
It seems to do with Hoisting and Closure?
https://cs3110.github.io/textbook/cover.html
Last edited: