$30 off During Our Annual Pro Sale. View Details »
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
The Truth About Truthy & Falsy
Search
Swaroop SM
April 10, 2015
Technology
1
57
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
60
ReactJS Awesomeness
swaroopsm
3
260
Testing JavaScript like a "BOSS"
swaroopsm
0
62
Other Decks in Technology
See All in Technology
SREには開発組織全体で向き合う
koh_naga
0
410
20251222_next_js_cache__1_.pdf
sutetotanuki
0
110
AWS re:Invent 2025~初参加の成果と学び~
kubomasataka
0
170
AI時代のワークフロー設計〜Durable Functions / Step Functions / Strands Agents を添えて〜
yakumo
3
1.8k
なぜ あなたはそんなに re:Invent に行くのか?
miu_crescent
PRO
0
110
「図面」から「法則」へ 〜メタ視点で読み解く現代のソフトウェアアーキテクチャ〜
scova0731
0
460
高度サイバー人材育成専科資料(前半)
nomizone
0
410
Strands Agents × インタリーブ思考 で変わるAIエージェント設計 / Strands Agents x Interleaved Thinking AI Agents
takanorig
4
1.7k
フルカイテン株式会社 エンジニア向け採用資料
fullkaiten
0
9.9k
Fashion×AI「似合う」を届けるためのWEARのAI戦略
zozotech
PRO
2
1.1k
Bedrock AgentCore Evaluationsで学ぶLLM as a judge入門
shichijoyuhi
0
100
【U/Day Tokyo 2025】Cygames流 最新スマートフォンゲームの技術設計 〜『Shadowverse: Worlds Beyond』におけるアーキテクチャ再設計の挑戦~
cygames
PRO
2
1.1k
Featured
See All Featured
Making Projects Easy
brettharned
120
6.5k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.6k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
286
14k
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
120
Discover your Explorer Soul
emna__ayadi
2
1k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
51k
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
47
33k
RailsConf 2023
tenderlove
30
1.3k
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
510
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.2k
BBQ
matthewcrist
89
9.9k
Designing for Performance
lara
610
69k
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