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
How does JavaScript work?
Search
Ulugbek Miniyarov
May 25, 2017
Programming
0
63
How does JavaScript work?
What is Javascript: a single-threaded non-blocking asynchronous concurrent language?
Ulugbek Miniyarov
May 25, 2017
Tweet
Share
More Decks by Ulugbek Miniyarov
See All by Ulugbek Miniyarov
DDD and CQRS Quick Overview
miniyarov
0
61
Software Architecture Patterns
miniyarov
1
28
Secure Software Development
miniyarov
0
39
Introduction to Docker
miniyarov
0
27
Advanced Blockchain Topics
miniyarov
0
40
Blockchain: from 0 to 1
miniyarov
0
85
Continuous Code Quality Inspection
miniyarov
0
37
Bitcoin Scripting, Smart Contracts (Ethereum), Tokens & ICO
miniyarov
0
31
PHP7 New Features
miniyarov
1
40
Other Decks in Programming
See All in Programming
Flutterで備える!Accessibility Nutrition Labels完全ガイド
yuukiw00w
0
160
Webの外へ飛び出せ NativePHPが切り拓くPHPの未来
takuyakatsusa
2
550
LT 2025-06-30: プロダクトエンジニアの役割
yamamotok
0
750
Rails Frontend Evolution: It Was a Setup All Along
skryukov
0
140
設計やレビューに悩んでいるPHPerに贈る、クリーンなオブジェクト設計の指針たち
panda_program
6
2.1k
AIと”コードの評価関数”を共有する / Share the "code evaluation function" with AI
euglena1215
1
160
脱Riverpod?fqueryで考える、TanStack Queryライクなアーキテクチャの可能性
ostk0069
0
120
VS Code Update for GitHub Copilot
74th
2
640
PicoRuby on Rails
makicamel
2
130
AIエージェントはこう育てる - GitHub Copilot Agentとチームの共進化サイクル
koboriakira
0
590
Discover Metal 4
rei315
2
130
PipeCDのプラグイン化で目指すところ
warashi
1
270
Featured
See All Featured
Speed Design
sergeychernyshev
32
1k
The Pragmatic Product Professional
lauravandoore
35
6.7k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
16k
It's Worth the Effort
3n
185
28k
Balancing Empowerment & Direction
lara
1
430
Writing Fast Ruby
sferik
628
62k
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
How GitHub (no longer) Works
holman
314
140k
Testing 201, or: Great Expectations
jmmastey
43
7.6k
Keith and Marios Guide to Fast Websites
keithpitt
411
22k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
48
2.9k
KATA
mclloyd
30
14k
Transcript
How does JavaScript work? Ulugbek Miniyarov Software Architect @ENUYGUN Heavily
inspired by Philip Roberts’ JSConf EU 2014 Talk
V8 Engine (Chrome’s JS Runtime) ChakraCore (Egde’s JS Runtime) Nitro
(Safari’s JS Runtime) SpiderMonkey (Firefox’s JS Runtime) JavaScript Engines:
JavaScript? A single-threaded non-blocking asynchronous concurrent language
JavaScript has a Call Stack, an Event Loop, a Callback
Queue, and some other apis (Ajax, Timing ...) Are they inside JavaScript Engines? - Only Call Stack with Heap
None
Asynchronous feature is not included in JavaScript Engine. Browsers /
NodeJS handles asynchronous part: - XHR Request - Timing (setTimeout, setInterval) - Events (onClick, onFocus i.e.)
None
The Call Stack one thread == one call stack ==
one thing at a time
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
Blocking And how non-blocking i/o gives asynchronicity
None
None
None
None
None
None
None
None
Demo: Blocking Script in Browser at: https://jsfiddle.net/9c9ztkvz/
Solution? Asynchronous Callback
None
None
None
None
None
None
None
Concurrency & Event Loop One thing at a time, except
not really.
None
None
None
None
None
None
None
None
None
None
None
None
None
Ready for a Quiz?
None
None
Demo Time!
Thanks