Tell us what’s happening:
I worked out the answer and it didn’t work. I checked the HINT and my answer was the same as yours and it still didn’t work. So, I copied your answer and posted it on the lesson and it still didn’t work. You apparently have a flaw that particular questions formula. So, how do I get past this question so I can continue my studies? I finally found out how to skip the question. I did check my work in my JavaScript console browser and my work was correct. I do hope someone is paying attention as there is definitely a problem with that questions secret answer.
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);
```js
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; rv:79.0) Gecko/20100101 Firefox/79.0
.
Challenge: Introducing Else Statements
Link to the challenge: