Ruby – Operators

Comparison operators
>
>=
< <= == != mathematical operators
+

*
/
%

Logical operators
! (can also use “not”)
&& (can also use “and”)
|| (can also use “or”)

Bitwise Intger Operators (not sure how these are used)
&
|
^
~
<< >>

Assignment Operators

+= e.g. a+=10 is shorthand for a=a+10 This is used for setting up a counter.
-= e.g. a-=10 is shorthand for a=a-10 Also used fo setting up a counter.
*= e.g. a*=10 is shorthand for a=a*10
/= e.g. a/=10 is shorthand for a=a/10
%= not sure about this
**= not sure about this
&=
|=
^=
>>=