Javascript newbie function doubts -
this question has answer here:
i learning javascript , never got idea of difference between creating function this:
var justme = function(param1, param2) { code code code; };
and this:
function justme(param1, param2) { code code code; }
and why in second example semi-colon not requiered @ end, in first example?
i'll give simply.
function justme(param1, param2) { code code code; }
here declaring function in it's original syntax.
var justme = function(param1, param2) { code code code; };
here assigning function body variable , hence require end semicolon.
Comments
Post a Comment