Quantcast
Channel: Difference between JavaScript function declarations? - Stack Overflow
Viewing all articles
Browse latest Browse all 6

Difference between JavaScript function declarations?

$
0
0

Why does calling my JavaScript function throw an error when I call it like this

wysiwyg2();var wysiwyg2 = function(){    alert(1);}

but work when I do this?

wysiwyg2();function wysiwyg2 (){    alert(1);}

Viewing all articles
Browse latest Browse all 6

Latest Images

Trending Articles





Latest Images