Tell us what’s happening:
So freecodecamp won’t accept my answer because it says I don’t have two else statements? There’s a green check mark next to my “two if statements” statement so it must recognize else if as an if statement. Is this just a bug?
Your code so far
function testElseIf(val) {
if (val > 10) {
return "Greater than 10";
} else if (val < 5) {
return "Smaller than 5";
} else {
return "Between 5 and 10";
}
// Change this value to test
testElseIf(7);
Your browser information:
Your Browser User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36
.
Link to the challenge:
https://www.freecodecamp.org/challenges/introducing-else-if-statements