I can not figure out why my code is'nt passing the test for this challenge

Tell us what’s happening:
Describe your issue in detail here.

  **Your code so far**

function testSize(num) {
// Only change code below this line

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 {
  return "Huge" 
}
// Only change code above this line
}

console.log(testSize(25));
}
  **Your browser information:**

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

Challenge: Chaining If Else Statements

Link to the challenge:

You’ve added some extra code that you shouldn’t have, for example, you’ve defined the testSize function again inside of the testSize function. You don’t need to define the function again, it is already defined in the default code given to you. You just need to add the logic inside of the function to get it to return the correct answer.

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