All language subtitles for 7. Node.js VS JavaScript

af Afrikaans
ak Akan
sq Albanian
am Amharic
ar Arabic
hy Armenian
az Azerbaijani
eu Basque
be Belarusian
bem Bemba
bn Bengali
bh Bihari
bs Bosnian
br Breton
bg Bulgarian
km Cambodian
ca Catalan
ceb Cebuano
chr Cherokee
ny Chichewa
zh-CN Chinese (Simplified)
zh-TW Chinese (Traditional)
co Corsican
hr Croatian
cs Czech
da Danish
nl Dutch
en English
eo Esperanto
et Estonian
ee Ewe
fo Faroese
tl Filipino
fi Finnish
fr French
fy Frisian
gaa Ga
gl Galician
ka Georgian
de German
el Greek
gn Guarani
gu Gujarati
ht Haitian Creole
ha Hausa
haw Hawaiian
iw Hebrew
hi Hindi
hmn Hmong
hu Hungarian
is Icelandic
ig Igbo
id Indonesian
ia Interlingua
ga Irish
it Italian
ja Japanese
jw Javanese
kn Kannada
kk Kazakh
rw Kinyarwanda
rn Kirundi
kg Kongo
ko Korean
kri Krio (Sierra Leone)
ku Kurdish
ckb Kurdish (Soranî)
ky Kyrgyz
lo Laothian
la Latin
lv Latvian
ln Lingala
lt Lithuanian
loz Lozi
lg Luganda
ach Luo
lb Luxembourgish
mk Macedonian
mg Malagasy
ms Malay
ml Malayalam
mt Maltese
mi Maori
mr Marathi
mfe Mauritian Creole
mo Moldavian
mn Mongolian
my Myanmar (Burmese)
sr-ME Montenegrin
ne Nepali
pcm Nigerian Pidgin
nso Northern Sotho
no Norwegian
nn Norwegian (Nynorsk)
oc Occitan
or Oriya
om Oromo
ps Pashto
fa Persian Download
pl Polish
pt-BR Portuguese (Brazil)
pt Portuguese (Portugal)
pa Punjabi
qu Quechua
ro Romanian
rm Romansh
nyn Runyakitara
ru Russian
sm Samoan
gd Scots Gaelic
sr Serbian
sh Serbo-Croatian
st Sesotho
tn Setswana
crs Seychellois Creole
sn Shona
sd Sindhi
si Sinhalese
sk Slovak
sl Slovenian
so Somali
es Spanish
es-419 Spanish (Latin American)
su Sundanese
sw Swahili
sv Swedish
tg Tajik
ta Tamil
tt Tatar
te Telugu
th Thai
ti Tigrinya
to Tonga
lua Tshiluba
tum Tumbuka
tr Turkish
tk Turkmen
tw Twi
ug Uighur
uk Ukrainian
ur Urdu
uz Uzbek
vi Vietnamese
cy Welsh
wo Wolof
xh Xhosa
yi Yiddish
yo Yoruba
zu Zulu
Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated: 1 00:00:00,240 --> 00:00:01,110 Welcome back. 2 00:00:01,620 --> 00:00:05,520 So how is no different than JavaScript? 3 00:00:06,180 --> 00:00:13,650 Well, we know that JavaScript is a programming language, and any time you want to run some JavaScript 4 00:00:13,650 --> 00:00:22,830 code or a file on your computer, you send it to a JavaScript engine like Chrome's V8. 5 00:00:23,130 --> 00:00:33,270 But also potentially others like Firefox is Spider Monkey Engine or Chakra, which was used in early 6 00:00:33,270 --> 00:00:36,600 versions of Microsoft's Edge browser. 7 00:00:37,320 --> 00:00:47,610 This engine then converts those JavaScript instructions to those that your hardware on your computer 8 00:00:47,610 --> 00:00:50,070 or phone understands. 9 00:00:51,120 --> 00:00:58,770 And it then goes ahead and follows those instructions in many ways as a developer, you're the boss 10 00:00:59,220 --> 00:01:02,280 and it's the computer doing all the hard work. 11 00:01:03,030 --> 00:01:07,680 I know, I know that programming can be hard work sometimes too. 12 00:01:08,340 --> 00:01:16,050 But as programmers, we get to do the fun work, giving the computer all of the higher level JavaScript 13 00:01:16,050 --> 00:01:21,360 instructions while it goes ahead and deals with all of the bits and bytes. 14 00:01:22,230 --> 00:01:30,510 Now this flow applies regardless of how you're running your JavaScript, whether it's Najib's or Chrome 15 00:01:30,900 --> 00:01:32,880 or any of the other browsers. 16 00:01:33,420 --> 00:01:37,110 There's always a JavaScript engine reading in your code. 17 00:01:37,860 --> 00:01:44,910 In fact, all of these browsers that you see here use Chrome's V8 engine anyway. 18 00:01:45,360 --> 00:01:52,480 No, this is a way of running JavaScript instructions on your computer. 19 00:01:52,560 --> 00:02:03,930 Outside of the web browser node only became possible because the Chrome team from Google made the V8 20 00:02:03,930 --> 00:02:06,000 engine open source. 21 00:02:06,930 --> 00:02:16,470 And Ryan Dole took advantage of this release by the Chrome team and created the node runtime around 22 00:02:16,620 --> 00:02:19,230 the V8 JavaScript engine. 23 00:02:20,270 --> 00:02:30,110 Now, note contains a lot more than just V8, but prior to Node JavaScript could only be run in a browser 24 00:02:30,680 --> 00:02:40,610 and not standalone because browsers were the only ones who had JavaScript engines like V8 Node was built 25 00:02:40,610 --> 00:02:48,110 so that we could run JavaScript anywhere, including your computer, but also your phone. 26 00:02:48,380 --> 00:02:56,180 Or believe it or not, even to control robots whenever you run JavaScript outside of the browser. 27 00:02:56,570 --> 00:02:59,960 Chances are you're running node now. 28 00:02:59,970 --> 00:03:10,190 There are other JS runtimes available now like Deno, which uses the V8 engine similarly to nodes, 29 00:03:10,790 --> 00:03:17,240 and there's even ways of running Node.js using other JavaScript engines. 30 00:03:17,630 --> 00:03:27,770 So there's a way of plugging in the Chakra engine from Microsoft to power nodes, but these are all 31 00:03:27,770 --> 00:03:29,330 modern developments. 32 00:03:29,780 --> 00:03:38,900 Node with the eight was where it all really started, and we're using JavaScript on the backend, which 33 00:03:38,900 --> 00:03:41,510 is something we'll get into very shortly. 34 00:03:42,050 --> 00:03:46,610 It's we're using JavaScript on the backend became widespread. 35 00:03:47,870 --> 00:03:48,440 All right. 36 00:03:48,500 --> 00:03:50,690 So enough with the history review. 37 00:03:51,140 --> 00:03:58,190 What's the difference to us as developers when running JavaScript code and node compared to when we 38 00:03:58,190 --> 00:04:02,600 run it in the browser going into our trusty rappel? 39 00:04:02,870 --> 00:04:11,810 We've already seen that in node window and all of the global functions that it provides in the browser 40 00:04:12,320 --> 00:04:14,180 are not defined. 41 00:04:15,630 --> 00:04:22,290 This makes sense because there's no browser or browser window that's currently running. 42 00:04:23,280 --> 00:04:30,810 Instead, Node has its own version called Global, which like Window, has a bunch of things that we 43 00:04:30,810 --> 00:04:31,500 can use. 44 00:04:32,190 --> 00:04:44,640 For example, the process object which we saw earlier and the ARG V property that has the list of arguments 45 00:04:44,640 --> 00:04:47,390 that were passed into our node program. 46 00:04:48,210 --> 00:04:56,220 We can access things like global dot process dot RV, but we don't need to import them from elsewhere. 47 00:04:56,730 --> 00:05:00,990 In fact, we don't even need to specify that they come from global. 48 00:05:01,470 --> 00:05:06,960 We can just type process dot RV, and it's already in scope. 49 00:05:07,880 --> 00:05:15,770 Global has all of the functionality that we can use directly, even the console log function that we're 50 00:05:15,770 --> 00:05:23,030 so familiar with is actually global, that console, that log and we can say hello. 51 00:05:24,530 --> 00:05:32,990 We don't have access to browser specific things like window or the document object, but we do have 52 00:05:32,990 --> 00:05:37,790 access to some very useful node specific things. 53 00:05:38,450 --> 00:05:43,580 Let's learn more about the globals that node gives us in the next video. 54 00:05:44,060 --> 00:05:44,960 I'll see you then. 5761

Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.