HELP Basic JavaScript: Selecting from Many Options with Switch Statements

I can’t get my code to work, can somebody check it and see if there is a human error by me, or is the website just messed up and won’t let me “test” it?

function caseInSwitch(val) {
  var answer = "";
  // Only change code below this line
  switch(val) {
case 1 : 
  answer = "alpha";

case 2 :
  answer = “beta”;

case 3 :
  answer =  “gamma”;

case 4 :
  answer =   “delta”;
  // Only change code above this line  
  return answer;  

// Change this value to test

Your double quotes aren’t actually double quotes.

Use ", which is next to the enter key instead of .

I’ve edited your post for readability. When you enter a code block into the forum, precede it with a line of three backticks and follow it with a line of three backticks to make easier to read. See this post to find the backtick on your keyboard. The “preformatted text” tool in the editor (</>) will also add backticks around text.


thank you! tried it! still doesn’t work :frowning:

what’s odd is that i can pass all the other Switch challenges right after it! odd! thanks for your help again!

Can you repost your code after your fix?

i figured it out! After replacing it with the correct double quotation marks it was good.

I just left my old attempts at the bottom!