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
61
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
53
Software Architecture Patterns
miniyarov
1
25
Secure Software Development
miniyarov
0
34
Introduction to Docker
miniyarov
0
20
Advanced Blockchain Topics
miniyarov
0
39
Blockchain: from 0 to 1
miniyarov
0
78
Continuous Code Quality Inspection
miniyarov
0
31
Bitcoin Scripting, Smart Contracts (Ethereum), Tokens & ICO
miniyarov
0
29
PHP7 New Features
miniyarov
1
36
Other Decks in Programming
See All in Programming
Rails 1.0 のコードで学ぶ find_by* と method_missing の仕組み / Learn how find_by_* and method_missing work in Rails 1.0 code
maimux2x
1
250
Datadog Workflow Automation で圧倒的価値提供
showwin
1
260
ABEMA iOS 大規模プロジェクトにおける段階的な技術刷新 / ABEMA iOS Technology Upgrade
akkyie
1
220
Kotlinの開発でも AIをいい感じに使いたい / Making the Most of AI in Kotlin Development
kohii00
5
1.4k
GoとPHPのインターフェイスの違い
shimabox
2
210
Jakarta EE meets AI
ivargrimstad
0
460
Datadog DBMでなにができる? JDDUG Meetup#7
nealle
0
150
はじめての Go * WASM *OCR
sgash708
1
110
Visual StudioのGitHub Copilotでいろいろやってみる
tomokusaba
1
210
Django NinjaによるAPI開発の効率化とリプレースの実践
kashewnuts
1
280
PEPCは何を変えようとしていたのか
ken7253
3
280
Go 1.24でジェネリックになった型エイリアスの紹介
syumai
2
300
Featured
See All Featured
Why You Should Never Use an ORM
jnunemaker
PRO
55
9.2k
The Pragmatic Product Professional
lauravandoore
32
6.4k
Build The Right Thing And Hit Your Dates
maggiecrowley
34
2.5k
Rails Girls Zürich Keynote
gr2m
94
13k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
114
51k
Imperfection Machines: The Place of Print at Facebook
scottboms
267
13k
Statistics for Hackers
jakevdp
797
220k
Building an army of robots
kneath
303
45k
Side Projects
sachag
452
42k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
29
1k
Six Lessons from altMBA
skipperchong
27
3.6k
Automating Front-end Workflow
addyosmani
1368
200k
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