Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
The Truth About Truthy & Falsy
Search
Swaroop SM
April 10, 2015
Technology
64
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
66
ReactJS Awesomeness
swaroopsm
3
260
Testing JavaScript like a "BOSS"
swaroopsm
0
76
Other Decks in Technology
See All in Technology
夫婦で子育てするための育児標準化
codmoninc
PRO
0
210
無理せず続ける、子育てエンジニアの学び
codmoninc
PRO
0
750
初海外で注意すべきこと12選!!!安全快適なre:invent生活にするために
yuuuuuuu168
1
120
Kiro Crewをはじめよう
kizawa2020
1
150
フロントエンドカンファレンス関西2026 - 速すぎるUIに、待ち時間を
teamlab
PRO
0
110
実践! SRE × AI - ABEMA における AIOps -
tetsuya28
8
3.1k
AI駆動で「他アプリの音を加工できる」アプリを作った
satomasahiro2005
0
100
PagerDuty Tech Hub-鳴らすけれど、人は動かない
ezaki
0
150
宣言型部分更新は何を解決しどこへ向かうのか
shuta13
1
430
LambdaWebFunctionsを試してみた / exploring-lambda-web-functions
koukihosaka
0
300
Running Kotlin + Quarkus with Lambda
nealle
1
3.3k
LocalStack を使ったサーバーレスアプリケーション開発 / Serverless Development with LocalStack
kakakakakku
1
450
Featured
See All Featured
Git: the NoSQL Database
bkeepers
PRO
433
67k
Deep Space Network (abreviated)
tonyrice
0
370
How STYLIGHT went responsive
nonsquared
100
6.3k
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
470
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
2.2k
Unsuck your backbone
ammeep
672
58k
Color Theory Basics | Prateek | Gurzu
gurzu
1
490
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
520
Embracing the Ebb and Flow
colly
88
5.2k
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
710
Building an army of robots
kneath
307
47k
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