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
JavaScript the tough parts 25min
Search
Guilherme Scotti
November 27, 2019
Technology
34
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
JavaScript the tough parts 25min
Guilherme Scotti
November 27, 2019
More Decks by Guilherme Scotti
See All by Guilherme Scotti
Web Components
scottibr
0
41
JavaScript the thought parts
scottibr
0
65
Other Decks in Technology
See All in Technology
DWH の限界突破! AI エージェント向け爆速リアルタイムデータ基盤 ClickHouse
jozono
1
470
Getting Started with Google Antigravity
glaforge
0
300
宣言型部分更新は何を解決しどこへ向かうのか
shuta13
1
450
Active Record Connection Adaptersにおける長年の課題に再び取り組む
yahonda
0
150
ブラウザとサーバーから考えるAI時代のフロントエンド監視
shogo4131
3
940
事業成長とデータ活用を止めないためのマネジメントへ挑戦
hiracky16
0
390
エンタメ企業のM&Aを支えるデータ基盤 ― 統合から店舗のリアルタイム分析まで / Data Engineering Summit 2026
genda
0
170
AI駆動開発の時代になったのでトヨタ生産方式から見直す
terurou
7
6k
実践!Cloud Run ハンズオン!! / Cloud Run handson
y0hgi
2
280
AI コーディングと人間の認知スループット / CTO Night & Day 2026 Morning Session / AI Coding and Human Cognitive Throughput
prog893
4
1k
AIカンパニーへの転換を支えた、エンジニアの仕事の再定義
kworkdev
PRO
2
1.2k
ソフトウェア ファクトリー - 再現性のあるソフトウェアの工場づくり / Software factory
iktakahiro
6
4.9k
Featured
See All Featured
GitHub's CSS Performance
jonrohan
1033
470k
Building the Perfect Custom Keyboard
takai
2
910
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
12k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.7k
Into the Great Unknown - MozCon
thekraken
41
2.8k
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
The SEO identity crisis: Don't let AI make you average
varn
0
590
Scaling GitHub
holman
464
140k
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
1.4k
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
320
Site-Speed That Sticks
csswizardry
13
1.6k
Leading Effective Engineering Teams in the AI Era
addyosmani
9
2.7k
Transcript
JavaScript The Tough Parts. scottiBR guilhermescotti Guilherme Scotti
JavaScript The Tough Parts. scottiBR guilhermescotti Mineiro 25 anos Eng.
Software Guilherme Scotti
Por que? “True mastery means understanding the core principles and
building up from them.” William Sentance Por que?
bit.ly/scotti-quiz
• JavaScript Under the Hood • Execution Context e Lexical
Environment • Hoisting • Lexical Scope • Closure
Interpreted Language Compiled Language Hybrid Language
“JavaScript is a lightweight, interpreted language” MDN Web Docs
None
SpiderMonkey Chakra Nitro V8
“Execution Context is defined as the environment in which the
JavaScript code is executed.” Rupesh Mishra “Execution Context is defined as the environment in which the JavaScript code is executed.” Rupesh Mishra • Compilation or Creation Phase • Execution Phase
HOISTING HOISTING Declarations of variables and functions being “moved to
top of your code”
HOISTING
“Hoisting refers to the default behavior of Javascript to process
and put all variables and functions declarations into Lexical Environment during compile phase of its execution context” Maya Shavin
Lexical Environment is a data structure that holds identifier-variable mapping
on the memory heap.
None
ES6 Let Const Arrow Functions ?
Undefined X Undeclared Reference Error
None
”All declarations in JavaScript function, var, let, const even classes,
are hoisted at the compiler phase“ Sukhjinder Arora
Temporal Dead Zone (TDZ)
None
”TDZ it’s a reserved memory space where declarations of ES6
remain until they are initialized“
Porque TDZ existe?
As far as I'm concerned the motivating feature for TDZs
is to provide a rational semantics for const. Allen Wirfs-Brock Chief Project Editor ES6
None
“A language with only let and var would have been
simpler then what we ended up with” Allen Wirfs-Brock Project Editor ES6
Function Declaration === Function Expressions ?
None
Vantagem do hoisting nas functions?
Mutual recursion a() -> b() -> c() -> a()
Lexical Scope
None
Closure
A closure is the combination of a function and the
lexical scope within which that function was declared. MDN
Closure is when a function is able to remember and
access its lexical scope. Kyle Simpson
None
Thank You Questions? scottiBR guilhermescotti Slides e Referências bit.ly/scottiSlides FeedBack
bit.ly/scottiFeedbacks