This forum is now read-only. Please use our new forums! Go to forums

banner
Close banner
0 points
over 9 years

Stuck on 28

I did this if (10 / 2 === 5) console.log(“I finished my course”) }else{ console.log(“You still have work to do”) }

and it red: SyntaxError: Syntax error

what should I do

Answer 548a1afbd3292fd3040000e9

1 vote

Permalink

You forgot a bracket after (10 / 2 === 5) You also didn’t write exactly what the computer wanted. The (“I finished my course”) should be (“I finished my first course!”) It should start out like this- if (10 / 2 === 5) {

Then your entire code would be correct! It will look like this,

if (10 / 2 === 5) { console.log(“I finished my first course!”) }else{ console.log(“You still have work to do”) }

I checked it and it worked for me, let me know if it worked for you.

points
Submitted by Lyd999
over 9 years

3 comments

toswald57 over 9 years

Not me

Lyd999 over 9 years

Oops! That’s probably because I had a backwards bracket…

if (10 / 2 === 5) { console.log(“I finished my first course!”) }else{ console.log(“You still have work to do”) }

Now It should work! Worked for me, and I promise it should work for you now. :-)

Lyd999 over 9 years

(Just so you know I changed it at the top too.)

Answer 548a19d8e39efea8820000a4

-3 votes

Permalink

You forgot the “;” at the end of console.log

points
Submitted by Umizu
over 9 years

1 comments

Neil over 9 years

While that is good coding practice it won’t in fact cause an error.