Afrikaans
Akan
Albanian
Amharic
Arabic
Armenian
Azerbaijani
Basque
Belarusian
Bemba
Bengali
Bihari
Bosnian
Breton
Bulgarian
Cambodian
Catalan
Cebuano
Cherokee
Chichewa
Chinese (Simplified)
Chinese (Traditional)
Corsican
Croatian
Czech
Danish
Dutch
English
Esperanto
Estonian
Ewe
Faroese
Filipino
Finnish
Frisian
Ga
Galician
Georgian
German
Greek
Guarani
Gujarati
Haitian Creole
Hausa
Hawaiian
Hebrew
Hindi
Hmong
Hungarian
Icelandic
Igbo
Indonesian
Interlingua
Irish
Italian
Japanese
Javanese
Kannada
Kazakh
Kinyarwanda
Kirundi
Kongo
Korean
Krio (Sierra Leone)
Kurdish
Kurdish (Soranรฎ)
Kyrgyz
Laothian
Latin
Latvian
Lingala
Lithuanian
Lozi
Luganda
Luo
Luxembourgish
Macedonian
Malagasy
Malay
Malayalam
Maltese
Maori
Marathi
Mauritian Creole
Moldavian
Mongolian
Myanmar (Burmese)
Montenegrin
Nepali
Nigerian Pidgin
Northern Sotho
Norwegian
Norwegian (Nynorsk)
Occitan
Oriya
Oromo
Pashto
Persian
Polish
Portuguese (Brazil)
Portuguese (Portugal)
Punjabi
Quechua
Romanian
Romansh
Runyakitara
Russian
Samoan
Scots Gaelic
Serbian
Serbo-Croatian
Sesotho
Setswana
Seychellois Creole
Shona
Sindhi
Sinhalese
Slovak
Slovenian
Somali
Spanish
Spanish (Latin American)
Sundanese
Swahili
Swedish
Tajik
Tamil
Tatar
Telugu
Thai
Tigrinya
Tonga
Tshiluba
Tumbuka
Turkish
Turkmen
Twi
Uighur
Ukrainian
Urdu
Uzbek
Vietnamese
Welsh
Wolof
Xhosa
Yiddish
Yoruba
Zulu
Almost everyone that has worked with JavaScript has heard of the V8 engine.
The idea of the JavaScript engine, and most people know that JavaScript is a single threaded language,
that it uses a callback.
You may also hear phrases like JavaScript is an interpreted language.
Let's tackle what that means over the next couple of videos.
What is this engine that we speak of?
Well, if I write some code like, let's say cost is happy equals to true.
Well, we just wrote some JavaScript.
I'm assigning the true boolean to the variable is happy.
Now how do we read this or how does the computer read this?
Imagine if somebody comes up to you and gives you a computer and they tell you, hey, tell this computer
to display a picture of horses on the screen.
And you start looking at this computer and you tell the computer to display an image of a horse or horses
in French.
Is the computer going to understand you?
No.
The computer would have no idea what you just said.
In similar fashion, if I gave a computer with a CPU.
A file that is a JavaScript file.
And I tell it, hey, read this file and do something for me.
Well, the computer only understands ones and zeros at the end of the day.
And when we give it the JavaScript file, it's like me talking to a computer in French and the computer
being like, What?
What are you talking about?
Plus, talking to a computer in French while people are going to look at you like you're a crazy person.
So the computer doesn't really know what JavaScript is.
So how are we able to communicate using a JavaScript file so that the computer displays pictures of
horses?
And this is the first step in our learning, and that is the JavaScript engine.
By having a JavaScript engine right over here, it allows you to give this machine the JavaScript file,
and this machine is going to understand this file and tell the computer what to do to display pictures
of horses.
In a sense, you just created a translator so you can communicate with somebody that doesn't know your
language.
And this special engine called the JavaScript engine understands JavaScript.
Our computer finally understands us because of this JavaScript engine and it says, I'm on it, boss.
I'll start displaying those horse pictures.
There you go.
That's our first step.
And over the next couple of videos, we're going to talk about exactly what's happening inside.
But do you think there's one JavaScript engine or many JavaScript engines?
Well, as you can see from this Wikipedia list, there are a ton of engines and they're called xma script
engines.
And we'll get into why that is later.
But these are all the JavaScript engines, some of them you may have heard of like V8 or spider monkey
or chakra.
So any time we use an engine, we're able to give it a JavaScript file.
And this JavaScript file gets understood by the engine, and it allows this engine to communicate and
tell the machine, the computer, to do what we ask it to do with JavaScript.
Now these engines are written by programmers.
For example, V8 engine is written in C++.
But why do people write these engines?
2008 marked a really pivotal moment in history when it comes to JavaScript because V8 was released by
Google.
Before then, most browsers used engines that were very basic, which meant that JavaScript was a little
bit slow.
You see, Google had this problem.
They had something called Google Maps.
And Google Maps, as you know, requires a lot of power.
It does a lot of things.
You can ask for directions to zoom in and zoom out, maybe even use Street View and all the previous
engines before it would make Google Maps very, very slow on the browser.
And Google, because they're a search engine, they want everybody to use their search engine and they
built a browser in order for them to control more of the market.
So with Google Maps and their own Chrome browser, they said, Hmm.
We're going to write our own JavaScript engine, the V8 engine.
So that JavaScript runs way faster on the browser than it's done previously.
And in 2008 they released V eight.
But the big takeaway for us here is that really, really smart people work on these engines so that
our JavaScript runs as fast as possible on the browser, on the server or any type of computer.
So every day JavaScript gets faster and faster for us because of the work that goes into these engines.
Okay.
But what is inside this engine, this magical machine that understands JavaScript?
It reads our code and then it runs this code.
Let's get into that in the upcoming video.
Bye bye.
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.