|
Anyone tell me why this doesn't work? (It's incredibly easy and really short)
I started learning this morning, and thought I'd try and make something using if/else, functions, console.log and variables, which is pretty much all i know so far. anyone tell me why this doesn't run/correct it?
var guess=function()
{
var number=prompt("guess what number i'm thinking of between 1 and 100");
}
if(
{
number<77
console.log("guess higher")
guess();
}
else if
{
number>77
console.log("guess lower")
guess();
}
else if
{
number===77
console.log"boom, nailed it"
}
guess();
Last edited by Dreyan; 08-10-2012 at 07:09 PM..
|