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
65
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
64
Software Architecture Patterns
miniyarov
1
30
Secure Software Development
miniyarov
0
42
Introduction to Docker
miniyarov
0
33
Advanced Blockchain Topics
miniyarov
0
42
Blockchain: from 0 to 1
miniyarov
0
88
Continuous Code Quality Inspection
miniyarov
0
39
Bitcoin Scripting, Smart Contracts (Ethereum), Tokens & ICO
miniyarov
0
32
PHP7 New Features
miniyarov
1
43
Other Decks in Programming
See All in Programming
AIコーディングAgentとの向き合い方
eycjur
0
270
Introducing ReActionView: A new ActionView-compatible ERB Engine @ Rails World 2025, Amsterdam
marcoroth
0
690
テストコードはもう書かない:JetBrains AI Assistantに委ねる非同期処理のテスト自動設計・生成
makun
0
300
Ruby Parser progress report 2025
yui_knk
1
440
基礎から学ぶ大画面対応(Learning Large-Screen Support from the Ground Up)
tomoya0x00
0
490
AI Coding Agentのセキュリティリスク:PRの自己承認とメルカリの対策
s3h
0
230
OSS開発者という働き方
andpad
5
1.7k
print("Hello, World")
eddie
2
530
How Android Uses Data Structures Behind The Scenes
l2hyunwoo
0
450
詳解!defer panic recover のしくみ / Understanding defer, panic, and recover
convto
0
240
ProxyによるWindow間RPC機構の構築
syumai
3
1.2k
プロパティベーステストによるUIテスト: LLMによるプロパティ定義生成でエッジケースを捉える
tetta_pdnt
0
330
Featured
See All Featured
Keith and Marios Guide to Fast Websites
keithpitt
411
22k
YesSQL, Process and Tooling at Scale
rocio
173
14k
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
3k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
667
120k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
358
30k
Building a Scalable Design System with Sketch
lauravandoore
462
33k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
18
1.1k
Facilitating Awesome Meetings
lara
55
6.5k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.9k
Six Lessons from altMBA
skipperchong
28
4k
Speed Design
sergeychernyshev
32
1.1k
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