I wonder why I keep getting error when I use else if conditionals, Please examine the code below and tell me what’s wrong with it.
var numOfPeople = 32
if (numOfPeople > 32) {console.log(‘Too many people,’)};
else if (numOfPeople< 32) {console.log(‘Too many people’)}
else {console.log(‘We are right on track’)}
Perhaps you should copy the lines of code and run on your system. Notice the syntaxerror message? Now delete the else in line 3 and notice that the code doesn’t run?
Please assist