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
French
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
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
Let's compare for a second.
Our browser window APIs with our Node Global's in the browser, whether we're using the V8 engine like
Chrome or something different like Firefox or Safari, we tend to deal with different things than note.
So while we have global A., We have a window in the browser and in the browser, we tend to deal with
HTML and browsing documents instead of processes like node script or a node server that are running
on your system and so on the browser.
We have things that help us interact with our browsing history and figure out our location.
The current address or URL our browser is pointed to, and there's this navigator object, which gives
us access to data about the browser that we're currently using.
These things don't make very much sense in note, but on the other hand, we have access to things like
the arguments that were passed into our process.
We have information about modules that we've loaded with code and functions that we want to reuse.
And because our node scripts run on our computer and tend to live in files when we're running node scripts,
we can get the file name of that script.
And there's also underscore underscore dir name for the directory in which your script lives, as we'll
see later in the course.
These things will all be very useful for us when writing node applications, but probably the most important
one is this require function here, which will dive really deeply into because you'll see it in just
about every node program.
But for now, just know that the required function here is built into nodes globals, and it allows
us to import functions and modules, many of which allow us to do things that browsers wouldn't allow
us to do, for example, to read and write files on your system and even to create a server that serves
those files over the internet.
Now this is all really high level, and I promise we'll be digging into all of this in way more detail.
But I just wanted to give you a breakdown of some of the more common globals that node provides for
us and compare them to what we have in the browser.
For a complete list of Global's, we can go to our no documentation here and scroll down to the Globals
page where we can see all of our globals, including the Dern name and file name which we mentioned,
as well as some that we haven't seen before, like the exports and the set timeout function here.
Which you might be familiar with from the browser.
It's the equivalent of the set timeout function that we have on the window object, just like the U
R L down here is the note equivalent of the URL class that we can access in our browser console.
And we can see that this URL class, if we go to the URL section here is browser compatible.
It follows this What WG URL standard?
Where what WG is a community, including Apple and Mozilla, that's responsible for many of the web
standards, including HTML.
And this URL class follows browser conventions to help us work with addresses like Example Dawg.
This is an example of how Node has gotten much, much better in recent versions at bridging the gap
between code.
We write on the browser and code that we write and note.
We can see an example of this in how this was added relatively recently in version version 10.0 in 2018.
Little changes like the addition of the URL class, make our life when going from front end to back
end code, which we'll be talking about next just a little bit easier.
All right.
So now that we have a better understanding of the relationship between JavaScript and Node.js and how
JavaScript in the browser differs from JavaScript in Node, let's take a quick break and I'll see you
in the next video.
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.