All language subtitles for 2- Constants

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: WEBVTT 1 00:00:00.000 --> 00:00:04.000 Alright now let's 2 00:00:04.000 --> 00:00:08.000 declare a variable called interest rate. So let 3 00:00:08.000 --> 00:00:12.000 interestRate and we set this to . 4 00:00:12.000 --> 00:00:16.000 3. Now this is the initial value, we can always change that 5 00:00:16.000 --> 00:00:20.000 later, so, we can set interest rate to let's say 1, 6 00:00:20.000 --> 00:00:24.000 now if you log this on the console, of course 7 00:00:24.000 --> 00:00:28.000 we're going to see the new value, right? So save the changes, and here's 8 00:00:28.000 --> 00:00:32.000 one on the console. However, on a real world application, 9 00:00:32.000 --> 00:00:36.000 there are situations that we don't want the value of a variable to change. 10 00:00:36.000 --> 00:00:40.000 Because otherwise it's going to create all kinds of bugs in our 11 00:00:40.000 --> 00:00:44.000 application. In those situations, instead of a variable, we 12 00:00:44.000 --> 00:00:48.000 use a constant. So the value of a variable as 13 00:00:48.000 --> 00:00:52.000 the name implies, can change, but the value of a constant cannot change. 14 00:00:52.000 --> 00:00:56.000 So here, if we change let 15 00:00:56.000 --> 00:01:00.000 to const. Now interestRate will be constant. 16 00:01:00.000 --> 00:01:04.000 So, when I save the changes, we're going to see an error 17 00:01:04.000 --> 00:01:08.000 in the console on line 3, where we reassign 18 00:01:08.000 --> 00:01:12.000 interestRate. So let's have a look. Save the changes. And here's the error. 19 00:01:12.000 --> 00:01:16.000 Uncaught typeError assignment to constant 20 00:01:16.000 --> 00:01:20.000 variable. You can see this error happened in index.js 21 00:01:20.000 --> 00:01:24.000 line 3, now if you click here, you can 22 00:01:24.000 --> 00:01:28.000 see the line in code where this error occurred. So we cannot 23 00:01:28.000 --> 00:01:32.000 reassign a constant. Alright now, back to the constant. 24 00:01:32.000 --> 00:01:36.000 So, here is the best practice, if you don't need to reassign 25 00:01:36.000 --> 00:01:40.000 constant should be your default choice. Otherwise 26 00:01:40.000 --> 00:01:44.000 if you need to reassign a variable, use let. 2245

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