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
You don't know JavaScript
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
C1nde
October 03, 2015
Programming
0
180
You don't know JavaScript
C1nde
October 03, 2015
Tweet
Share
Other Decks in Programming
See All in Programming
Claude Code Skill入門
mayahoney
0
410
存在論的プログラミング: 時間と存在を記述する
koriym
3
270
new(1.26) ← これすき / kamakura.go #8
utgwkk
0
2.6k
nuget-server - あなたが必要だったNuGetサーバー
kekyo
PRO
0
300
CSC307 Lecture 15
javiergs
PRO
0
260
コードレビューをしない選択 #でぃーぷらすトウキョウ
kajitack
3
1k
The free-lunch guide to idea circularity
hollycummins
0
290
「効かない!」依存性注入(DI)を活用したAPI Platformのエラーハンドリング奮闘記
mkmk884
0
130
AI 開発合宿を通して得た学び
niftycorp
PRO
0
160
メタプログラミングで実現する「コードを仕様にする」仕組み/nikkei-tech-talk43
nikkei_engineer_recruiting
0
200
エンジニアの「手元の自動化」を加速するn8n 2026.02.27
symy2co
0
170
それはエンジニアリングの糧である:AI開発のためにAIのOSSを開発する現場より / It serves as fuel for engineering: insights from the field of developing open-source AI for AI development.
nrslib
1
410
Featured
See All Featured
So, you think you're a good person
axbom
PRO
2
2k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
Joys of Absence: A Defence of Solitary Play
codingconduct
1
320
Context Engineering - Making Every Token Count
addyosmani
9
770
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
1.8k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.1k
Ten Tips & Tricks for a 🌱 transition
stuffmc
0
90
Building Applications with DynamoDB
mza
96
7k
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
330
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
200
Tell your own story through comics
letsgokoyo
1
850
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Transcript
You don’t know JavaScript @C1nde
None
>>> study[0] simple math
>>> [] + [] ""
>>> [] + [] "" >>> {} + {} NaN
>>> [] + [] "" >>> {} + {} NaN
>>> [] + {} "[object Object]"
>>> [] + [] "" >>> {} + {} NaN
>>> [] + {} "[object Object]" >>> {} + [] 0
>>> study[1] Boolean
>>> if (true) { console.log('Will be printed'); } >>> if
(false) { console.log('Will not be printed'); }
>>> if (new Boolean(false)) { console.log('hmmmm'); } hmm
>>> if (new Boolean(false)) { console.log('hmmmm'); } hmm >>> if
(Boolean(false)) { console.log('as expected'); }
>>> study[2] NaN
>>> isNaN(new Date()); false >>> isNaN(new Date('notADate')); true
>>> isNaN(null); false
>>> isNaN(null); false >>> isNaN(undefined); true
>>> isNaN(null); false >>> isNaN(undefined); true >>> undefined == NaN;
false
>>> isNaN(null); false >>> isNaN(undefined); true >>> undefined == NaN;
false >>> NaN == NaN; false
>>> study[3] Object
>>> var o = {}; >>> typeof o "object"
>>> var o = {}; >>> typeof o "object" >>>
o instanceof Object true
>>> typeof null "object"
>>> typeof null "object" >>> null instanceof Object false
>>> study[3] Object^W Null
>>> study[4] RegEx
>>> var lowerCaseOnly = /^[a-z]+$/;
>>> var lowerCaseOnly = /^[a-z]+$/; >>> lowerCaseOnly.test('a'); true >>> lowerCaseOnly.test('A');
false >>> lowerCaseOnly.test(''); false
>>> var lowerCaseOnly = /^[a-z]+$/; >>> lowerCaseOnly.test(null); true >>> lowerCaseOnly.test(undefined);
true >>> lowerCaseOnly.test(); true
>>> study[5] String
>>> 'a string' === 'a string' true
>>> 'a string' === 'a string' true >>> new String('a
string') === 'a string' false
>>> 'a string' === 'a string' true >>> new String('a
string') === 'a string' false >>> String('a string') === 'a string' true
>>> study[6] String & RegEx
>>> var address = 'http://storage. com/gifs/picture.jpg'; >>> address.match('.gif');
>>> var address = 'http://storage. com/gifs/picture.jpg'; >>> address.match('.gif'); /gif
>>> study[7] Object
>>> var obj = { its: 1, an: 2, obj:
3 }; >>> obj.its = null; >>> obj.an = undefined; >>> delete obj.obj;
>>> for(var item in obj) { if (obj.hasOwnProperty(item)) { console.log(item,
obj[item]); } } its null an undefined
>>> study[8] prototype
>>> var obj = {}; >>> var proto = Object.prototype;
>>> proto.isPrototypeOf(obj); false >>> Object.isPrototypeOf(obj); false
>>> var obj = new Object(); >>> var proto =
Object.prototype; >>> proto.isPrototypeOf(obj); false >>> Object.isPrototypeOf(obj); false
>>> var obj = {}; >>> var proto = Object.prototype;
>>> proto === Object.getPrototypeOf (obj); true
>>> study[9] ???
>>> undefined == null; true
[~] > cat check.coffee obj = prop: value if obj.prop?
console.log obj.prop [~] > coffee -b -p check.coffee var obj; obj = { prop: value }; if (obj.prop != null) { console.log(obj.prop); }
THANKS