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
46
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
49
Software Architecture Patterns
miniyarov
1
19
Secure Software Development
miniyarov
0
31
Introduction to Docker
miniyarov
0
18
Advanced Blockchain Topics
miniyarov
0
36
Blockchain: from 0 to 1
miniyarov
0
76
Continuous Code Quality Inspection
miniyarov
0
30
Bitcoin Scripting, Smart Contracts (Ethereum), Tokens & ICO
miniyarov
0
26
PHP7 New Features
miniyarov
1
34
Other Decks in Programming
See All in Programming
Compose-View Interop in Practice (mDevCamp 2024)
stewemetal
0
170
Anthropic Cookbook のおすすめレシピ
schroneko
7
1.2k
Komplexe Oberflächen mit SVG und der Web Animation API
joergneumann
0
680
Site Reliability Engineering for GMO
pyama86
8
1.1k
R言語の環境構築と基礎 Tokyo.R 112
bob3bob3
0
280
GitHub Copilotのススメ
marcy731
1
230
Elm Form Validation
bkuhlmann
0
510
StoreKit2によるiOSのアプリ内課金のリニューアル
kangnux
0
130
Snowflakeで眠ったデータを起こそう!
estie
0
150
Milestoner
bkuhlmann
1
410
Git Lint
bkuhlmann
4
760
Go製Webアプリケーションのエラーとの向き合い方大全、あるいはやっぱりスタックトレース欲しいやん / Kyoto.go #50
utgwkk
6
1.8k
Featured
See All Featured
Side Projects
sachag
451
41k
Fireside Chat
paigeccino
22
2.6k
Intergalactic Javascript Robots from Outer Space
tanoku
266
26k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
34
8.9k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
21
1.6k
The Power of CSS Pseudo Elements
geoffreycrofte
62
5k
Building Flexible Design Systems
yeseniaperezcruz
320
37k
Rails Girls Zürich Keynote
gr2m
91
13k
How STYLIGHT went responsive
nonsquared
92
4.8k
Web Components: a chance to create the future
zenorocha
306
41k
Optimizing for Happiness
mojombo
370
69k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
117
18k
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