Chaining If Else Statements (test won't run)

Chaining If Else Statements (test won't run)
0

#1

Tell us what’s happening:

Your code so far


function testSize(num) {
  // Only change code below this line
 
  if (num < 5) {
    return "Tiny";
  } else if (num < 10) {
    return "Small";
  } else if (num < 15) {
    return "Medium";
  } else if (num < 20) {
    return "Large";
  } else (num >= 20) {
    return "Huge";
  }
  

  // Only change code above this line
}

// Change this value to test
testSize(7);

Your browser information:

User Agent is: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:61.0) Gecko/20100101 Firefox/61.0.

Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-javascript/chaining-if-else-statements/


#2

The else statement doesn’t have a condition. Just else {…}


#3

i see thanks for that. it went through once i removed that part