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
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Swaroop SM
April 10, 2015
Technology
1
59
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
62
ReactJS Awesomeness
swaroopsm
3
260
Testing JavaScript like a "BOSS"
swaroopsm
0
65
Other Decks in Technology
See All in Technology
Phase03_ドキュメント管理
overflowinc
0
2.4k
FlutterでPiP再生を実装した話
s9a17
0
150
FastMCP OAuth Proxy with Cognito
hironobuiga
3
190
韓非子に学ぶAI活用術
tomfook
2
330
AIエージェント勉強会第3回 エージェンティックAIの時代がやってきた
ymiya55
0
120
Amazon Qはアマコネで頑張っています〜 Amazon Q in Connectについて〜
yama3133
1
100
AI時代のIssue駆動開発のススメ
moongift
PRO
0
200
Windows ファイル共有(SMB)を再確認する
murachiakira
PRO
0
270
SaaSに宿る21g
kanyamaguc
2
150
形式手法特論:SMT ソルバで解く認可ポリシの静的解析 #kernelvm / Kernel VM Study Tsukuba No3
ytaka23
1
780
TUNA Camp 2026 京都Stage ヒューリスティックアルゴリズム入門
terryu16
0
220
AWS Systems Managerのハイブリッドアクティベーションを使用したガバメントクラウド環境の統合管理
toru_kubota
0
160
Featured
See All Featured
30 Presentation Tips
portentint
PRO
1
260
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
Accessibility Awareness
sabderemane
0
84
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
220
Leo the Paperboy
mayatellez
4
1.5k
Design in an AI World
tapps
0
180
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
3.7k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
2.8k
Statistics for Hackers
jakevdp
799
230k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.5k
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