unary operators, + and -, which indicate negative and positive numbers : Math Operators « Language Basics « Ruby
- Ruby
- Language Basics
- Math Operators
unary operators, + and -, which indicate negative and positive numbers
puts +7 + -5
puts -20 + 32
puts -20 - +32
puts 20 * -8
Related examples in the same category