Not working Basic JavaScript: Multiple Identical Options in Switch Statements

I ive gotten it to work elsewhere, but its not working in the test out put area and I dont know why. and it says everything is wrong.

here is my code:

function sequentialSizes(val) {

  var answer = "";

  // Only change code below this line

switch(val) {

    case 1:

    case 2:

    case 3:

      answer = "Low";

      break;

  case 4:

  case 5:

  case 6:

      anwser= "Mid";

      break;

  case 7:

  case 8:

  case 9:

    anwser= "High";

    break;

}

  // Only change code above this line

  return answer;

}

sequentialSizes(1);

Make normal quotation mark.

Two typos on answers below!

1 Like

Hey @atwone

  • Next time when you want to share a piece of code, please use the Preformatted text tool (</>) or by using 3 backticks with the language you are using, ex:
```js
//code here
``` end with another 3 backtick

  • Next time you need help on the challenges, you can do so by pressing the Get Help button directly from the challenge:

I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (’).