0

Explain Boolean, truthy, and Falsey?? Break it down for me please.

?when would I use this? What is it? strictly integers or nahh? LAMENS TERMS PLZ

29th Aug 2017, 4:42 PM
Jordan Maurice Wofford
Jordan Maurice Wofford - avatar
6 Respuestas
+ 11
see complete description with examples here : https://www.thoughtco.com/boolean-operators-2907909
29th Aug 2017, 5:17 PM
P R
P R - avatar
+ 8
Like other programming language Ruby also have booleans data type for condition checking In Ruby only false and nil are falsey. Everything else is truthy (yes, even 0 is truthy).
29th Aug 2017, 4:54 PM
P R
P R - avatar
+ 7
condition checking here means using logical operators && , || , ! for example: 4 && 5 # This returns 5 nil && true # This returns nil true && nil # This returns nil true || nil # This returns true nil || "" # This returns ""
29th Aug 2017, 5:01 PM
P R
P R - avatar
0
what does condition checking mean?? when will I use it or when would it come up??
29th Aug 2017, 4:56 PM
Jordan Maurice Wofford
Jordan Maurice Wofford - avatar
0
you just may have confused me more..ok so... anything dwtermined falsely or nil is valued less than 0. so -1 is falsely?? do logical operators vary from language to language
29th Aug 2017, 5:06 PM
Jordan Maurice Wofford
Jordan Maurice Wofford - avatar
0
word.. that helped a lot. Preeeci8tit.
29th Aug 2017, 5:32 PM
Jordan Maurice Wofford
Jordan Maurice Wofford - avatar