DEV Community

jazmineubanks
jazmineubanks

Posted on

TIL 03/14/23

Today I am still working on Ruby. I am trying to get myself to remember booleans and their meanings, so I will continue to study these.

(taken from code academy)

  1. With && both comparisons on the left and right must evaluate to true for the entire statement to return true. If the left side does not return true it will not bother trying the right side
  2. With || either the right or left side must evaluate to true. If the left side evaluates to true, the right side will not be tried because it has met the condition of one side being true.
  3. With ! you reverse the result. If you’re false you’re now true. if you’re true you’re now false! Just think of it as opposite day!

Top comments (0)