mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2024-11-27 04:44:08 +03:00
Merge pull request #1608 from venegu/master
[javascript/en] Adding modulo division
This commit is contained in:
commit
e34123e5df
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user