I can't find out what is the problem with this JSFiddle.
HTML:
<input type=button value=test onclick=test()>
JavaScript:
function test(){alert(test);}
And when I click on button - nothing happened. The console says test not defined
I've read the JSFiddle documentation - there it says that JS code is added to <head>
and HTML code is added to <body>
(so this JS code is earlier than html and should work).