I just bought the latest version of "JavaScript: The Ultimate Guide" and already asked a question .: D
Are the following lines semantically the same:
var square = function(n){
return n * n;
};
and
function square(n){
return n * n;
}
If so, what are the advantages / disadvantages of using any of them?
Thank you for your help!
aydio source
share