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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
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
65
Software Architecture Patterns
miniyarov
1
34
Secure Software Development
miniyarov
0
42
Introduction to Docker
miniyarov
0
33
Advanced Blockchain Topics
miniyarov
0
49
Blockchain: from 0 to 1
miniyarov
0
90
Continuous Code Quality Inspection
miniyarov
0
47
Bitcoin Scripting, Smart Contracts (Ethereum), Tokens & ICO
miniyarov
0
41
PHP7 New Features
miniyarov
1
44
Other Decks in Programming
See All in Programming
AIエージェントの設計で注意するべきポイント6選
har1101
7
3.4k
AI & Enginnering
codelynx
0
110
IFSによる形状設計/デモシーンの魅力 @ 慶應大学SFC
gam0022
1
300
副作用をどこに置くか問題:オブジェクト指向で整理する設計判断ツリー
koxya
1
590
React 19でつくる「気持ちいいUI」- 楽観的UIのすすめ
himorishige
11
5.9k
フルサイクルエンジニアリングをAI Agentで全自動化したい 〜構想と現在地〜
kamina_zzz
0
400
そのAIレビュー、レビューしてますか? / Are you reviewing those AI reviews?
rkaga
6
4.5k
Unicodeどうしてる? PHPから見たUnicode対応と他言語での対応についてのお伺い
youkidearitai
PRO
1
1.1k
Data-Centric Kaggle
isax1015
2
760
なるべく楽してバックエンドに型をつけたい!(楽とは言ってない)
hibiki_cube
0
140
カスタマーサクセス業務を変革したヘルススコアの実現と学び
_hummer0724
0
620
AIエージェントのキホンから学ぶ「エージェンティックコーディング」実践入門
masahiro_nishimi
3
300
Featured
See All Featured
Building a Scalable Design System with Sketch
lauravandoore
463
34k
Why Our Code Smells
bkeepers
PRO
340
58k
Chasing Engaging Ingredients in Design
codingconduct
0
110
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.2k
Become a Pro
speakerdeck
PRO
31
5.8k
Making Projects Easy
brettharned
120
6.6k
Amusing Abliteration
ianozsvald
0
96
Optimizing for Happiness
mojombo
379
71k
Code Review Best Practice
trishagee
74
20k
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
0
290
We Have a Design System, Now What?
morganepeng
54
8k
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
0
250
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