Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exercise 9 -If Statements #318

Open
Brett-A-Clark opened this issue Jun 18, 2021 · 1 comment
Open

Exercise 9 -If Statements #318

Brett-A-Clark opened this issue Jun 18, 2021 · 1 comment

Comments

@Brett-A-Clark
Copy link

Below is my code

let fruit = 6
if(fruit > 5) {
console.log("The fruit name has more than five
characters");
} else {
console.log("The fruit name has five characters or less");
}

Screenshot is error message. Please help.
01B0186A-ACA1-470A-A5B4-63E674943D67

@itzsaga
Copy link
Member

itzsaga commented Jun 21, 2021

@Brett-A-Clark if this is your exact code:

let fruit = 6
if(fruit > 5) {
console.log("The fruit name has more than five
characters");
} else {
console.log("The fruit name has five characters or less");
}

The root of the error is that this statement can't be on two lines:

console.log("The fruit name has more than five
characters");

Try:

console.log("The fruit name has more than five characters");

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants