Basic JavaScript - Introducing Else Statements

Tell us what’s happening:

Describe your issue in detail here.
Tengo este resultado :
function testElse(val){
var result = “”;
// Only change code below this line

if (val > 5) {
result = “Bigger than 5”;
} else {
result = “5 or Smaller”;
}

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

// Change this value to test
testElse(4);

y me manda esta respuesta :
// running tests
You should not change the code above or below the specified comments.
// tests

Ya lo borré y lo volví a escribir, cerré sesión , reinicié la página y nada funciona

Your code so far

 function testElse(val){
  var result = "";
  // Only change code below this line

  if (val > 5) {
    result = "Bigger than 5";
  } else {
    result = "5 or Smaller";
  }

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

// Change this value to test
testElse(4);

Your browser information:

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

Challenge Information:

Basic JavaScript - Introducing Else Statements

You appear to have created this post without editing the template. Please edit your post to Tell us what’s happening in your own words.

Bienvenido al foro @aline07

Cambie la palabra clave var nuevamente a let

La próxima vez solo cambia el código que te piden.

Feliz codificación

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