Introducing Else If Statements - Whats wrong?

Introducing Else If Statements - Whats wrong?
0

#1

Hey what’s wrong with this?

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);

Link to the challenge:


#2

You are missing a } in your code. Make sure each { has a matching }.


#3

oh found it. thanks :slight_smile: