Javascript not running/executing?


I'm new so please be patient, I'm trying to learn Javascript on my computer with no Internet connection, I opened scratchpad in Mozilla.
But whenever I type the script I get :
Exception: SyntaxError: expected expression, got etc.....
What am I I wrong?

Replace this line with your code.


in var s = (Math.floor(Math.random()*2)%2)) you have an extra closing paranthesis.



html tags aren't part of js (look at what the error message is saying)

You could load a html file with js in it in a script tag, but the interface you've got up there is probably more convenient so long as you're only running javascript without any interest in a web page


I deleted the script tag but stil not having any luck, can you give an example as to how this is supposed to work..


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.