Fireship · @fireship
JavaScript: How It's Made
Uploaded July 2, 2019 · Length 10:54
Summary
This video explains the computer science behind JavaScript, covering its high-level, single-threaded, garbage-collected, and interpreted nature, as well as its dynamic typing, multi-paradigm, and prototype-based design.
- javascript
- computer science
- programming language
- high-level language
- single-threaded
- garbage collection
- interpreted language
- dynamic typing
- multi-paradigm
- prototype-based
Transcript preview
The first 2 minutes of the transcript. Select a timestamp to watch that moment on YouTube.
- 0:00
today on how they do it JavaScript today
- 0:02
we'll look at the computer science
- 0:04
behind it so by the end of this video
- 0:05
you should understand what a high-level
- 0:07
single-threaded garbage-collected
- 0:08
interpreted or just-in-time compiled
- 0:10
prototype-based multi-paradigm dynamic
- 0:12
language with a non-blocking event loop
- 0:13
concurrency model really means if you're
- 0:22
new you're like and subscribe because
- 0:23
this is part 2 of the full javascript
- 0:25
course on fire ship i/o last week we
- 0:27
learn that javascript is a programming
- 0:28
language based on the ECMO 262 spec but
- 0:31
in order to really understand how it
- 0:32
works in a computer system we need to go
- 0:34
to the very bottom of the stack and by
- 0:35
that I mean the bare metal CPU and
- 0:37
memory on a machine this is a riddle
- 0:38
computer on hearing Ishida the tips that
- 0:41
make the computer work when you run a
- 0:44
JavaScript program whether that be a web
- 0:45
application in the browser or something
- 0:47
server side with nodejs it needs to
- 0:49
allocate memory on your RAM to store
- 0:51
things for the runtime and for variables
- 0:53
and objects that you reference in your
- 0:54
code then it also needs a thread from
- 0:57
your CPU to actually execute the
- 0:59
instructions in your code but here's the
- 1:01
thing as a JavaScript developer you
- 1:03
never really have to think about this
- 1:04
stuff because it's a high-level
- 1:05
programming language but what do we
- 1:07
really mean when we say high-level we're
- 1:09
talking about the degree of abstraction
- 1:10
or simplification that the language
- 1:12
provides over the computer's hardware
- 1:14
the lowest level language is machine
- 1:16
code
- 1:16
it's a numeric language that can be
- 1:18
executed directly by the CPU but it
- 1:20
would be extremely difficult to build a
- 1:21
website with it because you would have
- 1:22
to memorize a number for every single
- 1:24
instruction that you want to run if we
- 1:26
go up one level to assembly we get some
- 1:28
syntactic sugar but each assembly
- 1:29
language is specific to a particular CPU
- 1:31
or operating system so we can move up
- 1:33
another level to the C language which
- 1:36
provides a modern syntax and the ability
- 1:37
to write cross-platform programs but the
- 1:40
developers still has to be concerned
- 1:41
with low-level issues like memory
- 1:42
allocation if we go one more step higher
- 1:45
we reach the level of languages like
- 1:46
JavaScript and Python that use
- 1:48
abstractions like garbage collectors and
- 1:50
dynamic typing to simplify the way
- 1:51
developers write their applications so
- 1:54
now that we're at this high level let's
- 1:55
go ahead and unpack a few of the key
- 1:57
terms related to JavaScript now there
- 1:59
are two fundamental ways that we can


