Fireship · @fireship
JavaScript in 100 Seconds
Uploaded January 13, 2022 · Length 2:36
Summary
javascript basics explained in 100 seconds, including its features and uses.
- javascript basics
- javascript features
- javascript uses
- programming language
- web development
Transcript preview
The first 2 minutes of the transcript. Select a timestamp to watch that moment on YouTube.
- 0:02
javascript a high level single threaded
- 0:04
garbage collected interpreted or just in
- 0:06
time compiled prototype-based
- 0:07
multi-paradigm dynamic language with a
- 0:09
non-blocking event loop made famous for
- 0:11
building websites it was created in 1995
- 0:14
in just one week by brendan ike with the
- 0:16
goal of adding an easy to learn
- 0:18
scripting language to the netscape
- 0:19
browser it was originally named mocha
- 0:21
but the genius marketing people of the
- 0:23
time wanted it to sound like that sexy
- 0:25
new java language today it's a fully
- 0:27
featured language that continues to
- 0:28
evolve through the ecmascript standard
- 0:30
it's most well known for building
- 0:32
front-end web applications because it's
- 0:34
the only language other than web
- 0:35
assembly that is natively supported in
- 0:37
browsers however anything that can be
- 0:39
built with javascript will be built with
- 0:41
javascript like server-side applications
- 0:43
with node.js mobile applications with
- 0:45
react native or ionic and desktop apps
- 0:47
with electron it's an interpreted
- 0:49
scripting language but tools like the v8
- 0:51
engine and chromium use a just-in-time
- 0:53
compiler to convert it to machine code
- 0:55
at runtime it's also excellent at
- 0:57
handling i o intensive jobs despite the
- 0:59
fact that it's a single threaded
- 1:01
language made possible by a non-blocking
- 1:03
event loop that can queue up work in the
- 1:05
background without blocking the main
- 1:06
thread to get started create a file
- 1:08
ending in.js your code will start
- 1:11
executing from the global context use
- 1:13
the console to log a value with the
- 1:15
built-in debugger now think about where
- 1:17
you want to run this file is it a
- 1:18
front-end browser or a back-end node.js
- 1:20
server in the browser you can reference
- 1:22
it with a script tag then the browser
- 1:24
will execute it when you open that html
- 1:26
file on a website javascript is often
- 1:28
used to grab an element from the dom
- 1:30
document query selector will grab the
- 1:32
first button then we can assign it to a
- 1:34
variable with either var let or const
- 1:36
var is the og way to do it but is
- 1:38
typically avoided let is for variables
- 1:40
that can be reassigned while const is
- 1:42
for variables that cannot be reassigned
- 1:44
now to make the button interactive we
- 1:45
can add an event listener to it by
- 1:47
defining a function for the on click
- 1:49
event we can use the function keyword
- 1:51
here or the more concise arrow syntax
- 1:53
now the event loop will execute this
- 1:55
function whenever a new click occurs
- 1:57
functions are first class objects to
- 1:58
support functional programming patterns


