You are viewing our Forum Archives. To view or take place in current topics click here.
[Javascript] Need help. (CodeAcademy)
Posted:
[Javascript] Need help. (CodeAcademy)Posted:
Status: Offline
Joined: May 16, 201212Year Member
Posts: 582
Reputation Power: 25
Status: Offline
Joined: May 16, 201212Year Member
Posts: 582
Reputation Power: 25
#2. Posted:
Status: Offline
Joined: Jan 01, 201113Year Member
Posts: 1,957
Reputation Power: 401
Status: Offline
Joined: Jan 01, 201113Year Member
Posts: 1,957
Reputation Power: 401
Perhaps you should read a little more into the IF statement (Section 14/28 on Getting Started with Programming)
You will never learn anything if you are always spoon fed the answers ;)
You will never learn anything if you are always spoon fed the answers ;)
- 4useful
- 0not useful
#3. Posted:
Status: Offline
Joined: Sep 29, 201212Year Member
Posts: 7
Reputation Power: 0
I agree with Imp, however I understand it can get frustrating if you can't figure out how to get your code functioning right away.
Proper syntax for comparisons (less than, greater than, etc.) are as follows.
Less than - <
Less than or equal to - <=
Greater than - >
Greater than or equal to - =>
Your if statements should go something like this:
Happy coding, friend!
Proper syntax for comparisons (less than, greater than, etc.) are as follows.
Less than - <
Less than or equal to - <=
Greater than - >
Greater than or equal to - =>
Your if statements should go something like this:
if(age < 13) // If age is less than 13.
{
// Do something.
}
else if(age => 13) // If age is over or equal to 13
{
// Do something else.
}
Happy coding, friend!
- 0useful
- 0not useful
You are viewing our Forum Archives. To view or take place in current topics click here.