+ 1
Need help with this question
-than 100 but less than 2000 and store this as a variable named âuserâ -write an if statement that checks to see if âuserâ is greater than 100 and less than 2000 -if it is then it should assign message1 to a variable named result. If it not then it should assign message2 instead. var message1 = âyou are amazingâ var message2 = âaww, it looks like that number is not correct.
2 Answers
+ 1
So what's the question? (What you having trouble with?)
+ 1
Example of an IF statement.
if( thisConditionIs == true )
{
// Do this code block
}
else
{
// Do this instead if condition isn't true
}