Looked at it, can't find error


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

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36.

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

else statements shouldn’t test for anything. Therefore everything inside including parentheses is unnecessary.

1 Like

else () {
return “Huge”;
}

So just that?

EDIT: Oh I don’t even need () in there either.