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
Swaroop SM
April 10, 2015
Technology
59
1
Share
The Truth About Truthy & Falsy
Deck demonstrating which values are truthy / falsy w.r.t a programming language.
Swaroop SM
April 10, 2015
More Decks by Swaroop SM
See All by Swaroop SM
Client-Side Data Modelling and more...
swaroopsm
0
63
ReactJS Awesomeness
swaroopsm
3
260
Testing JavaScript like a "BOSS"
swaroopsm
0
66
Other Decks in Technology
See All in Technology
[最強DB講義]推薦システム | 評価編
recsyslab
PRO
0
110
AIでAIをテストする - 音声AIエージェントの品質保証戦略
morix1500
1
140
Class.new is all you need
riseshia
1
190
AI時代 に増える データ活用先
takahal
0
330
Standards et agents IA : un tour d’horizon de MCP, A2A, ADK et plus encore
glaforge
0
200
Do Ruby::Box dream of Modular Monolith?
joker1007
1
360
AWS DevOps Agentはチームメイトになれるのか?/ Can AWS DevOps Agent become a teammate
kinunori
6
780
Choose your own adventure in agentic design patterns
glaforge
0
160
音声言語モデル手法に関する発表の紹介
kzinmr
0
140
Claude Code を安全に使おう勉強会 / Claude Code Security Basics
masahirokawahara
12
37k
Arcana: Production-Ready RAG in Elixir @ ElixirConf EU 2026
georgeguimaraes
0
120
目的ファーストのハーネス設計 ~ハーネスの変更容易性を高めるための優先順位~
gotalab555
8
2.5k
Featured
See All Featured
Testing 201, or: Great Expectations
jmmastey
46
8.1k
Abbi's Birthday
coloredviolet
2
7.2k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
55k
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
120
The World Runs on Bad Software
bkeepers
PRO
72
12k
Visualization
eitanlees
150
17k
Building Flexible Design Systems
yeseniaperezcruz
330
40k
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
740
Optimising Largest Contentful Paint
csswizardry
37
3.6k
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
0
260
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.8k
The agentic SEO stack - context over prompts
schlessera
0
760
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