Skip to content

Bug: We really dont need 9 "case" here #12742

@Shubham-invent

Description

@Shubham-invent

Challenge Name

https://www.freecodecamp.com/challenges/multiple-identical-options-in-switch-statements

Issue Description

Please see for passing test it is asking for 9 "Cases" which is not actually needed.

Browser Information

  • Browser Name, Version:
  • Operating System:
  • Mobile, Desktop, or Tablet:

Your Code

function sequentialSizes(val) {
  var answer = "";
  // Only change code below this line
  switch(true){   
      case val<=3 :answer="Low";break;
      case val<=6:answer="Mid";break;
      case val<=9:answer="High";break;
  }

  // Only change code above this line  
  return answer;  
}

// Change this value to test
sequentialSizes(1);

Screenshot

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: discussingUnder discussion threads. Closed as stale after 60 days of inactivity.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions