I'm learning javascript and something I haven't quite understood is why the result of this operation is equal to 1.
Calculating the modulo, shouldn't it be 7?
var mynumber = 11;
alert(mynumber % 2);
Modulo % is remainder division.
2 goes into 11 five times with 1 left over.
aka 11 = 5 * 2 + 1
You might want a refresher on modulo