# Thread: Need some help with Code Academy

1. Registered User
Join Date
Feb 2013
Posts
1

## Need some help with Code Academy

I'm taking a course at my local college for programming, and one of the assignments is going to code academy. Which I don't like because I don't think it explains good enough for what it wants you to do. But anyways here is the description of the exercise.

"Write code that contains an if/else statement, just like we did in the last exercise. When your condition is true, print to the console "I am right". When it is false, print to the console "I am wrong". Make sure your statement evaluates to false so it prints out "I am wrong".

Ok I found the answer online because I couldn't figure it out, here it is.

if (10 > 5 * 2) {
} else {
console.log(1);
console.log("Oops, please try again");
}

So my question is what does it mean when it says console.log(1); What does the (1) mean?

2. Registered User
Join Date
Feb 2013
Posts
1
Originally Posted by hotrod624
I'm taking a course at my local college for programming, and one of the assignments is going to code academy. Which I don't like because I don't think it explains good enough for what it wants you to do. But anyways here is the description of the exercise.

"Write code that contains an if/else statement, just like we did in the last exercise. When your condition is true, print to the console "I am right". When it is false, print to the console "I am wrong". Make sure your statement evaluates to false so it prints out "I am wrong".

Ok I found the answer online because I couldn't figure it out, here it is.

if (10 > 5 * 2) {
} else {
console.log(1);
console.log("Oops, please try again");
}

So my question is what does it mean when it says console.log(1); What does the (1) mean?
I just started using code-academy yesterday.

"if (10 > 1 * 2)
{
console.log("I am right");
}
else
{
console.log("I am wrong");
}
Is a similar answer I gave, console.log(1) doesn't need to be there.