Tell us what’s happening:
I created the code below and also used the example code in the hint as a secondary test, but the grader keeps claiming that the function does not return the correct result if 4 and 5 are used as arguments What can I do now?
Marie
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 6.2; Win64; x64; rv:66.0) Gecko/20100101 Firefox/66.0
.
Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-javascript/introducing-else-statements/