Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
29 lines (19 sloc) 354 Bytes

!SLIDE subsection

nil

!SLIDE

nil

@@@ Ruby
# nil is the Ruby value for null
var = nil

# Check if the value is nil
var.nil?
# => true

# Alternative version, almost never used
var == nil
# => true

!SLIDE

nil

@@@ Ruby

# nil evaluates to false
nil ? true : false
# => false
Jump to Line
Something went wrong with that request. Please try again.