Ruby Programming Language

Operators

By

First published on September 9, 2019. Last updated on February 16, 2020.


An operator typically transforms and analyzes something else, such as a variable, constant Below are several categories of operators.

Arithmetic

  1. + addition
  2. subtraction
  3. * multiplication
  4. / division

String Comparison

  1. eq equality
  2. ne inequality
  3. lt less than
  4. gt greater than
  5. le less than or equal
  6. ge greater than or equal

Numeric Comparison

  1. == equality
  2. != inequality
  3. < less than
  4. > greater than
  5. <= less than or equal
  6. >= greater than or equal

Others

  1. && and
  2. || or
  3. ! not
  4. =~ containes

 

 

 


COURSE


Content is copyright the author. Layout is copyright Mark Ciotola. See Corsbook.com for further notices.