Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
The Truth About Truthy & Falsy
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Swaroop SM
April 10, 2015
Technology
1
58
The Truth About Truthy & Falsy
Deck demonstrating which values are truthy / falsy w.r.t a programming language.
Swaroop SM
April 10, 2015
Tweet
Share
More Decks by Swaroop SM
See All by Swaroop SM
Client-Side Data Modelling and more...
swaroopsm
0
61
ReactJS Awesomeness
swaroopsm
3
260
Testing JavaScript like a "BOSS"
swaroopsm
0
63
Other Decks in Technology
See All in Technology
20260208_第66回 コンピュータビジョン勉強会
keiichiito1978
0
190
今こそ学びたいKubernetesネットワーク ~CNIが繋ぐNWとプラットフォームの「フラッと」な対話
logica0419
3
270
生成AIと余白 〜開発スピードが向上した今、何に向き合う?〜
kakehashi
PRO
0
120
会社紹介資料 / Sansan Company Profile
sansan33
PRO
15
400k
モダンUIでフルサーバーレスなAIエージェントをAmplifyとCDKでサクッとデプロイしよう
minorun365
4
220
Agile Leadership Summit Keynote 2026
m_seki
1
660
プロポーザルに込める段取り八分
shoheimitani
1
610
CDK対応したAWS DevOps Agentを試そう_20260201
masakiokuda
1
380
Oracle AI Database移行・アップグレード勉強会 - RAT活用編
oracle4engineer
PRO
0
110
10Xにおける品質保証活動の全体像と改善 #no_more_wait_for_test
nihonbuson
PRO
2
330
小さく始めるBCP ― 多プロダクト環境で始める最初の一歩
kekke_n
1
520
SREチームをどう作り、どう育てるか ― Findy横断SREのマネジメント
rvirus0817
0
330
Featured
See All Featured
Chasing Engaging Ingredients in Design
codingconduct
0
110
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
2.3k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.7k
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
0
140
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.4k
Evolving SEO for Evolving Search Engines
ryanjones
0
130
[SF Ruby Conf 2025] Rails X
palkan
1
760
GraphQLの誤解/rethinking-graphql
sonatard
74
11k
Tell your own story through comics
letsgokoyo
1
810
The untapped power of vector embeddings
frankvandijk
1
1.6k
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
110
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
160
Transcript
WTF (What’s Truthy Falsy) Swaroop SM Cybrilla Technologies
- TRUTHY: If the value isn’t literally “true” but evaluates
to true. - FALSY: If the value isn’t literally “false” but evaluates to false. What is it?
undefined 0 false “” null NaN nil [] {} true
True False None
var a = 0; if(a) { alert(“I’m TRUTHY :)”); }
else { alert(“I’m FALSY. Feel so proud. :D”); } The Confusion
TRUTHY - true - 0 - “” - [] -
{} Ruby FALSY - false - nil
Ruby on Rails present? - !blank? - 0 - true
blank? - nil - “” - [] - {} - false - whitespace
Python TRUTHY - True - 1 FALSY - False -
None - 0 - [] - “” - {}
JavaScript TRUTHY - true - “0” - [] - {}
FALSY - 0 - false - “” - undefined - null - NaN
Thank You! @smswaroop http://www.github.com/swaroopsm/truthy-falsy