Tell us what’s happening:
Cant seem to get the testElseIf values to work. The code seems to be ok, but when i plug the desired values into the testElseIf statement at the bottom, it doesnt complete.
Your code so far
function testElseIf(val) {
if (val > 10) {
return "Greater than 10";
}
else if (val < 10) {
return "Less than 10";
}
if (val < 5) {
return "Smaller than 5";
}
else if (val > 5) {
return "Greater than 5";
}
else {
return "Between 5 and 10";
}
}
// Change this value to test
testElseIf(0)