Change:
Challenge %20%7B%0A%20%20var%20answer%20%3D%20%22%22%3B%0A%20%20%2F%2F%20Only%20change%20code%20below%20this%20line%0A%20%20%0A%20%20switch%20(val)%20%7B%0A%20%20%20%20%20%20%0A%20%20%7D%0A%20%20%0A%20%20%0A%20%20%2F%2F%20Only%20change%20code%20above%20this%20line%20%20%0A%20%20return%20answer%3B%20%20%0A%7D%0A%0A%2F%2F%20Change%20this%20value%20to%20test%0AsequentialSizes(1)%3B%0A%0A) has an issue. User Agent is: <codeMozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.96 Safari/537.36</code. Please describe how to reproduce this issue, and include links to screenshots if possible. My code: Excercise previous switch case was introduced like this: However in this excercise it is shown like this: code styling should be consistent.

Discussion:
"description": [ "If you have many options to choose from, use a <code>switch</code> statement. A <code>switch</code> statement tests a value and can have many <code>case</code> statements which define various possible values. Statements are executed from the first matched <code>case</code> value until a <code>break</code> is encountered.", "Here is a <dfn>pseudocode</dfn> example:", <del> "<blockquote>switch (num) {<br>  case value1:<br>    statement1;<br>    break;<br>  case value2:<br>    statement2;<br>    break;<br>...<br>  case valueN:<br>    statementN;<br>    break;<br>}</blockquote>", </del> <ins> "<blockquote>switch(num) {<br>  case value1:<br>    statement1;<br>    break;<br>  case value2:<br>    statement2;<br>    break;<br>...<br>  case valueN:<br>    statementN;<br>    break;<br>}</blockquote>", </ins> "<code>case</code> values are tested with strict equality (<code>===</code>). The <code>break</code> tells JavaScript to stop executing statements. If the <code>break</code> is omitted, the next statement will be executed.", "<hr>", "Write a switch statement which tests <code>val</code> and sets <code>answer</code> for the following conditions:<br><code>1</code> - "alpha"<br><code>2</code> - "beta"<br><code>3</code> - "gamma"<br><code>4</code> - "delta""

"" ], "solutions": [ <del> "function caseInSwitch(val) {n  var answer = "";nn  switch (val) {n    case 1:n      answer = "alpha";n      break;n    case 2:n      answer = "beta";n      break;n    case 3:n      answer = "gamma";n      break;n    case 4:n      answer = "delta";n  }n  return answer;  n}" </del> <ins> "function caseInSwitch(val) {n  var answer = "";nn  switch(val) {n    case 1:n      answer = "alpha";n      break;n    case 2:n      answer = "beta";n      break;n    case 3:n      answer = "gamma";n      break;n    case 4:n      answer = "delta";n  }n  return answer;  n}" </ins> ], "tests": [ "assert(caseInSwitch(1) === "alpha", 'message: <code>caseInSwitch(1)</code> should have a value of "alpha"');",

"description": [ "Si tienes varias opciones para elegir, usa una sentencia <code>switch</code>. Una sentencia <code>switch</code> prueba un valor y puede tener varias sentencias <code>case</code> las cuales definen varios posibles valores. Las sentencias son ejecutadas desde el primer valor <code>case</code> igualado hasta que se encuentr un <code>break</code>.", "Aquí hay un <dfn>pseudocódigo</dfn> de ejemplo:", <del> "<blockquote>switch (num) {<br>  case valor1:<br>    sentencia1;<br>    break;<br>  case valor2:<br>    sentencia2;<br>    break;<br>...<br>  case valorN:<br>    sentenciaN;<br>    break;<br>}</blockquote>", </del> <ins> "<blockquote>switch(num) {<br>  case valor1:<br>    sentencia1;<br>    break;<br>  case valor2:<br>    sentencia2;<br>    break;<br>...<br>  case valorN:<br>    sentenciaN;<br>    break;<br>}</blockquote>", </ins> "Los valores <code>case</code> son probados con estricta igualdad (<code>===</code>). El <code>break</code> le dice a JavaScript que pare la ejecución del bloque de sentencias en el que está. Si se omite <code>break</code>, se ejecutará la siguiente sentencia.", "<h4>Instrucciones</h4>", "Escribe una sentencia <code>switch</code> que pruebe <code>val</code> y establezca <code>answer</code> para las siguientes condiciones:<br><code>1</code> - "alpha"<br><code>2</code> - "beta"<br><code>3</code> - "gamma"<br><code>4</code> - "delta""

"description": [ "En una sentencia <code>switch</code> puede que no seas capaz de especificar todos los posibles valores en las sentencias <code>case</code>. En su lugar, puedes agregar la sentencia <code>default</code> la cual será ejecutada si no es encontrada ninguna coincidencia con alguna sentencia <code>case</code>. Piensa en esto como la última sentencia <code>else</code> en una cadena <code>if/else</code>.", "Una sentencia <code>default</code> debería ser el último caso.", <del> "<blockquote>switch (num) {<br>  case valor1:<br>    sentencia1;<br>    break;<br>  case valor2:<br>    sentencia2;<br>    break;<br>...<br>  default:<br>    sentenciaDefault;<br>}</blockquote>", </del> <ins> "<blockquote>switch(num) {<br>  case valor1:<br>    sentencia1;<br>    break;<br>  case valor2:<br>    sentencia2;<br>    break;<br>...<br>  default:<br>    sentenciaDefault;<br>}</blockquote>", </ins> "<h4>Instrucciones</h4>", "Escribe una sentencia switch para establecer <code>answer</code> para las siguientes condiciones:<br><code>"a"</code> - "apple"<br><code>"b"</code> - "bird"<br><code>"c"</code> - "cat"<br><code>default</code> - "stuff"" ]

"" ], "solutions": [ <del> "function sequentialSizes(val) {n  var answer = "";n  n  switch (val) {n    case 1:n    case 2:n    case 3:n      answer = "Low";n      break;n    case 4:n    case 5:n    case 6:n      answer = "Mid";n      break;n    case 7:n    case 8:n    case 9:n      answer = "High";n  }n  n  return answer;  n}" </del> <ins> "function sequentialSizes(val) {n  var answer = "";n  n  switch(val) {n    case 1:n    case 2:n    case 3:n      answer = "Low";n      break;n    case 4:n    case 5:n    case 6:n      answer = "Mid";n      break;n    case 7:n    case 8:n    case 9:n      answer = "High";n  }n  n  return answer;  n}" </ins> ], "tests": [ "assert(sequentialSizes(1) === "Low", 'message: <code>sequentialSizes(1)</code> should return "Low"');",

"If you have many options to choose from, a <code>switch</code> statement can be easier to write than many chained <code>if</code>/<code>else if</code> statements. The following:", "<blockquote>if (val === 1) {<br>  answer = "a";<br>} else if (val === 2) {<br>  answer = "b";<br>} else {<br>  answer = "c";<br>}</blockquote>", "can be replaced with:", <del> "<blockquote>switch (val) {<br>  case 1:<br>    answer = "a";<br>    break;<br>  case 2:<br>    answer = "b";<br>    break;<br>  default:<br>    answer = "c";<br>}</blockquote>", </del> <ins> "<blockquote>switch(val) {<br>  case 1:<br>    answer = "a";<br>    break;<br>  case 2:<br>    answer = "b";<br>    break;<br>  default:<br>    answer = "c";<br>}</blockquote>", </ins> "<hr>", "Change the chained <code>if</code>/<code>else if</code> statements into a <code>switch</code> statement." ],

"" ], "solutions": [ <del> "function chainToSwitch(val) {n  var answer = "";nn  switch (val) {n    case "bob":n      answer = "Marley";n      break;n    case 42:n      answer = "The Answer";n      break;n    case 1:n      answer = "There is no #1";n      break;n    case 99:n      answer = "Missed me by this much!";n      break;n    case 7:n      answer = "Ate Nine";n  }n  return answer;  n}" </del> <ins> "function chainToSwitch(val) {n  var answer = "";nn  switch(val) {n    case "bob":n      answer = "Marley";n      break;n    case 42:n      answer = "The Answer";n      break;n    case 1:n      answer = "There is no #1";n      break;n    case 99:n      answer = "Missed me by this much!";n      break;n    case 7:n      answer = "Ate Nine";n  }n  return answer;  n}" </ins> ], "tests": [ "assert(!/else/g.test(code), 'message: You should not use any <code>else</code> statements anywhere in the editor');",

"Si tienes varias opciones para elegir, una sentencia <code>switch</code> puede ser más fácil de escribir que varias sentencias <code>if</code>/<code>if else</code> anidadas. Lo siguiente:", "<blockquote>if (val === 1) {<br>  respuesta = "a";<br>} else if (val === 2) {<br>  respuesta = "b";<br>} else {<br>  respuesta = "c";<br>}</blockquote>", "puede ser reemplazado con:", <del> "<blockquote>switch (val) {<br>  case 1:<br>    respuesta = "a";<br>    break;<br>  case 2:<br>    respuesta = "b";<br>    break;<br>  default:<br>    respuesta = "c";<br>}</blockquote>", </del> <ins> "<blockquote>switch(val) {<br>  case 1:<br>    respuesta = "a";<br>    break;<br>  case 2:<br>    respuesta = "b";<br>    break;<br>  default:<br>    respuesta = "c";<br>}</blockquote>", </ins> "<h4>Instrucciones</h4>", "Cambia las sentencias <code>if</code>/<code>if else</code> anidadas dentro de una sentencia <code>switch</code>." ]