html - What is wrong with my javascript reference -


i'm trying make simon program, started random color generator. can find what's wrong this? thanks! html:

<!doctype html> <html> <body> <script src="memorygamejs.js"> </script> </body> </html> 

javascript:

var colornumber = math.random(); if (colornumber < '.26'){         colorchoice = "red"; }     else if (colornumber < '.51'){         colorchoice = "yellow"; }     else if (colornumber < '.76'){         colorchoice = "green"; }     else{         colorchoice = "blue"; } } console.log(colorchoice); 

you got }. remove it, works fine: http://jsfiddle.net/tymejv/g44da/

remember check console errors, have seen:

uncaught syntaxerror: unexpected token }


Comments

Popular posts from this blog

jquery - Common JavaScript snippet to share files on Google Drive, Dropbox, Box.net or SkyDrive -

user interface - Python attempting to create a simple gui, getting "AttributeError: 'MainMenu' object has no attribute 'intro_screen'" -

Android Gson.fromJson error -