mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2025-08-02 04:50:29 +02:00
add modulus operator
This commit is contained in:
@@ -39,6 +39,7 @@ You shouldn't either
|
|||||||
10 * 2 #=> 20
|
10 * 2 #=> 20
|
||||||
35 / 5 #=> 7
|
35 / 5 #=> 7
|
||||||
2**5 #=> 32
|
2**5 #=> 32
|
||||||
|
5 % 3 #=> 2
|
||||||
|
|
||||||
# Arithmetic is just syntactic sugar
|
# Arithmetic is just syntactic sugar
|
||||||
# for calling a method on an object
|
# for calling a method on an object
|
||||||
|
Reference in New Issue
Block a user