Problem with if-else statement


#1

I'm having a similar problem too!!
I'm trying to write an if /else statement. I've tried a couple of times, comparing mine to albionsrefuge and even the JavaScript glossary but I still seem to be missing something in my code. Getting a lot of Syntax error.
Here it is...........
// Not sure where to begin? Check the Hint!
if ("Alex started before 3pm"){
console.log("Alex finished first!");
}
else if{ ("Alex started after 3pm")
console.log("I finished my first course!");
}

Open to any pointers!! Thanx


If/else statements are the bane of my existance!
#2

In JavaScript, a string expression is cast as true in a conditional if it is not an empty string.

Supply an expression that may be either true or false so the expression is conditional.

Eg.

if (100 < 10 * 10) {

}
else if (100 > 10 * 10) {

} else {
    console.log("I' finished my first course!";
}

#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.