Guessing Game
by wooozy
HTML
<font size="3" color="blue">Welcome to the Guessing game</font>
CSS
http://stackoverflow.com/questions/25856960/keeping-a-running-list-on-a-page-using-javascript
JavaScript
var game = {
num : 0,
turns : 1,
reset : function() {
this.turns = 1;
this.newNum();
}
newNum : function() {
this.num = parseInt(Math.random() * 10) +1;
},
guessNumber : function(guess) {
try
guess = parseInt(guess);
}
catch(e)
{
alert("Guess a lucky number! :)");
this.turns++;
return false;
}
var tries = [];