Basic JavaScript - Escaping Literal Quotes in Strings

function testElseIf(num) {

if (num < 5) {
return “Smaller than 5”;
} else {
if (num <= 10) {

return “Between 5 and 10”;
} else {

return “Greater than 10”;
}
}
}

testElseIf(7);

const myStr = ""; // Change this line
``` este fragmento de codigo deberia funcionar , en el test me sale error y me dice ue debo ultilizar las etiuetas de apartura y de cierre en cada sentencia if else , eesta perfecto el codigo . que es lo ue pasa  ?

**Your browser information:**

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

**Challenge:** Basic JavaScript - Escaping Literal Quotes in Strings

**Link to the challenge:**
https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/basic-javascript/escaping-literal-quotes-in-strings

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