Basic JavaScript - Chaining If Else Statements

Tell us what’s happening:
I don’t understand what is incorrect in my code

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


Your browser information:

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

Challenge: Basic JavaScript - Chaining If Else Statements

Link to the challenge:

Double check the example of how the else should look

1 Like

In addition to what @JeremyLT correctly suggested make sure you have a closing curly bracket for your function.
Make sure to check those typos:


This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.