All language subtitles for 8. Working with the REPL vs Using Files 88

af Afrikaans
ak Akan
sq Albanian
am Amharic
ar Arabic Download
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
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:02,230 --> 00:00:08,750 Now before we finally dive into the javascript refresher or optionally in case you skip that, into the 2 00:00:08,810 --> 00:00:10,010 nodejs basics, 3 00:00:10,220 --> 00:00:17,180 let me dive into two different ways of executing your node code. One way of executing it which I briefly 4 00:00:17,180 --> 00:00:25,700 mentioned earlier in this module is the repl. Repl stands for read, reading user input, eval, evaluating 5 00:00:25,700 --> 00:00:35,390 user input, print, outputting a result and l, loop for returning and waiting for new input and the repl 6 00:00:35,390 --> 00:00:36,380 is what you use 7 00:00:36,440 --> 00:00:43,040 if you just type node into your terminal. Here I am in the terminal or on Windows this would be your command 8 00:00:43,040 --> 00:00:48,950 prompt and there if you just type node with node installed, you are now in the repl which you can identify 9 00:00:48,950 --> 00:00:54,350 by the fact that you now don't have that full path of your computer name at the beginning but just that 10 00:00:55,010 --> 00:00:56,340 greater than sign 11 00:00:56,480 --> 00:01:05,090 and there you can execute node commands like console log, two plus two or also writing, interacting with 12 00:01:05,090 --> 00:01:05,750 files. 13 00:01:05,810 --> 00:01:12,860 You can import the file system there just as we did it previously in our file and then we can use that 14 00:01:12,890 --> 00:01:15,760 to write a file synchronously and so on, 15 00:01:15,860 --> 00:01:17,340 so that will all work here 16 00:01:17,570 --> 00:01:21,870 and this is of course an environment where we don't store our code in files 17 00:01:21,920 --> 00:01:25,890 but we write our node application with every line. 18 00:01:25,940 --> 00:01:28,150 The lines don't work independent from each other, 19 00:01:28,190 --> 00:01:31,730 so I can now use the file system package for example 20 00:01:31,730 --> 00:01:39,710 now that I imported it one line earlier but once I quit out of this process with control c, I'm done. 21 00:01:39,710 --> 00:01:41,090 This is not saved anywhere, 22 00:01:41,090 --> 00:01:45,950 this is not a file I can execute again and this therefore is a great playground. 23 00:01:45,950 --> 00:01:51,470 The alternative to running codes is that you execute files as we did it before and as we will basically 24 00:01:51,470 --> 00:01:53,250 do it for the rest of the course, 25 00:01:53,260 --> 00:01:56,900 this is the alternative to using the repl. When you execute files, 26 00:01:56,900 --> 00:02:02,750 the advantage of course is and that is why we use it for real apps, that we write our code in advance 27 00:02:02,750 --> 00:02:08,930 and we can always execute it and when we build a real app, we want to save our code of course in files 28 00:02:08,930 --> 00:02:14,120 which we can then deploy in the end which we could share with other developers and where we can also pause 29 00:02:14,120 --> 00:02:15,840 our work and pick up later 30 00:02:15,880 --> 00:02:22,060 and where we never lose the code we write. But the repl is a great playground because we can use that to run some 31 00:02:22,070 --> 00:02:27,660 commands, to try out certain things because we execute code as we write it and therefore these are the 32 00:02:27,710 --> 00:02:30,650 two ways of running your node code, 33 00:02:30,800 --> 00:02:35,390 obviously we'll go with the store code in files approach in this course 34 00:02:35,480 --> 00:02:41,750 but whenever I say repl, I'm referring to this direct input way which I can recommend for trying out 35 00:02:41,750 --> 00:02:45,710 some features but not for writing real applications, 36 00:02:45,710 --> 00:02:47,510 that is not what you would do. 37 00:02:47,510 --> 00:02:50,430 I just wanted to get these two ways out of the way, 38 00:02:50,480 --> 00:02:56,270 we'll focus on the left one here and with that, let's dive into writing some code with the next modules. 4154

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