Your code should work if you use this.
It dosn’t work!!!
I still get the same error
This should work for you.
oh now I get A different error: SyntaxError: unknown: ‘return’ outside of function. (16:2)
Remove everything and try this.
now this code got two errors:1st error: You should only have one statement in the editor
2nd error :You should not change the code above or below the specified comments.
Please show me your code, otherwise I can’t help.
function testElse(val) {
var result = “”;
// Only change code below this line
if (val > 5) {
result = “Bigger than 5”;
} else if (val <= 5) {
result = “5 or Smaller”;
}
// Only change code above this line
return result;
}
// Change this value to test
testElse(4);
That should work. Did you change testElse(4) to some other number to test?
but maybe there is a error that we do not know
, yes. The assignment is:
You should only have one if
statement in the editor
This should work for you.
It did not work but gave the same error
This should work: only one if statement, and testElse(4) changed to testElse(7).