Something I noticed during 8/13


#1

So during the Function, return and if / else exercise I noticed something of a bug that will allow you to move on to the next exercise without meeting the requirements of this exercise. I am really curious as to why this bug works.

So the code they provide you is as follows:

var quarter = function (number){

};

if (quarter() % 3 === 0 ) {
console.log("The statement is true");
} else {
console.log("The statement is false");
}

The "if" statement is where I made a small change to break this code, if you look at % 3 ===0 and change it to % 3 %=0 and press submit you will get an error message that says "ReferenceError: Invalid left-hand side in assignment" but you will also get the Congratulation message, my question is why did I get both messages and How did that small of a change cause this sort of error?


#2

May be you should concentrate on becoming a code-tester...