The things on the left are the test cases, that call the function you have written on the right. They do not care what you have written outside of the function.
If you want to see the output of what you have written, you need to put it int console.log(testNotEqual(99)).
This will create an output on the right, in the lower part.
Each test listed on the lower left side of your screen calls the function with different arguments.
// Setup
function testNotEqual(val) {
if (val != 99) { // Change this line
return "Not Equal";
}
return "Equal";
}
testNotEqual(99); // This is what the first test does
testNotEqual("99"); // This is what the second test does
testNotEqual(12); // This is what the third test does
testNotEqual("12"); // This is what the fourth test does
testNotEqual("bob"); // This is what the fifth test does
The test suite makes those 5 function calls on its own.
Yes, you wrote val != 99, which is why you get the correct result. If you had written val != 12, then the function would have the wrong result.
What do you see if you actually run the following code?
// Setup
function testNotEqual(val) {
console.log("val is: " + val);
console.log("val != 99 is:" + (val != 99));
// ---------------------------------
if (val != 99) { // Change this line
return "Not Equal";
}
return "Equal";
}
testNotEqual(99); // This is what the first test does
testNotEqual("99"); // This is what the second test does
testNotEqual(12); // This is what the third test does
testNotEqual("12"); // This is what the fourth test does
testNotEqual("bob"); // This is what the fifth test does