I have looked up the difference between using == and === for comparison in JavaScript and it makes sense.
Some of my students have been asking about why App Lap is forcing them to use three equal signs when comparing any integers against 0. Both operands are integers so no type conversion is necessary.
for example :
var count = 0;
// some code here
if (count == 0)
{
console.log(“zero”);
}
App Lab warns Use ‘===’ to compare with ‘0’;
Does anybody know why only a comparison with 0 generates this error?