JavaScript
// All variables must be declared as a window property. var x = 0; will not work as expected.
"$ var window.x = 0",
"$ x+=1",
"$ alert(x)""Hi there!",
function(){
alert("This is pretty useful!");
return true; // Will make the engine execute the next statement when the function finishes.
},
"Isn't it?""The result of 2+2 is: " + (2+2),
"Isn't that right?"Last updated
Was this helpful?