Math and the Modulo -- That's what I wrote and it said the same thing


#1

// Below is an example of printing the remainder of 18/4 using modulo:
// console.log(18 % 4);
console.log("14 % 3");
console.log("99 % 8");
console.log("11 % 3");

That's what I wrote and it said the same thing.


Math and the modulo
#2

These are not the same:

"14 % 3"  // this is a string of characters
14 % 3  // this is a mathematical equation

So you see the difference?


#3

Yeah after waking up after my coffee, I did see that, DOH! See, no coffee equals dumb! LOL

Thanks !


#4

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.