ChipChamp007 Posted January 22, 2007 Share Posted January 22, 2007 Okay, I'm making a sort of Sudoku game out of html and javascript, but I want it to have multiple levels, and select a level at random. The problem is when I tried to test doing a random number like this: var game=Math.floor(Math.random*11)document.write(game) It writes NaN. How can I make it so that it... works? Link to comment Share on other sites More sharing options...
Skemcin Posted January 22, 2007 Share Posted January 22, 2007 try:var game=(Math.round(Math.random()*11)) Link to comment Share on other sites More sharing options...
ChipChamp007 Posted January 23, 2007 Author Share Posted January 23, 2007 Lol, that did it. Thanks! Link to comment Share on other sites More sharing options...
Anders Moen Posted January 23, 2007 Share Posted January 23, 2007 Can you post the rest of the code too? I'm looking for the same thing ^^ Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now