Introducing Else If Statements - TestValue Statement

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

You need to consider one thing: once a return statement is executed than a value is returned and the function stops. Your first if/else if statement will execute for all numbers but 10 so the second if else if statement is almost never executed

Got it. Just passed. Thx!