Is it ever necessary to add a semicolon at the end of a function definition like the following
function helloWorld() { //some code }; //note the semicolon here at the end is it ever necessary? Ever I have a friend that swears this is optional. I think it is never optional I have never read anything about it being optional at the end of a function. I have never seen any one ever do that "Except him". Is the semi colon optional.
var hellWorld = function (){ }; // the semicolon here it is optional because you are defining a variable this is OK and optional