Adding modulo division to JavaScript article

This commit is contained in:
venegu 2015-10-17 22:21:25 -04:00
parent 324c707c08
commit 53366ebdbe

View File

@ -54,6 +54,11 @@ doStuff()
// Including uneven division.
5 / 2; // = 2.5
// And modulo division.
10 % 2; // = 0
30 % 4; // = 2
18.5 % 7; // = 4.5
// Bitwise operations also work; when you perform a bitwise operation your float
// is converted to a signed int *up to* 32 bits.
1 << 2; // = 4