All language subtitles for 010 Refreshing Array Functions_en

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
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

Original subtitles

In the last lecture we had a look at reference of primitive types something super important to keep

in mind when working with javascript.

Another thing you will see quite a lot in this course are array functions.

We already saw filter a couple of lectures ago.

We also got sort, map and so on.

Let me quickly show you what I mean.

The good old numbers array with 1, 2 and 3.

Now let's say we want to turn this into an array where each number is doubled.

So we have to doubleNumArray, something like that we can use an array function for this.

We can take the numbers array and call map.

Map is a built-in array method.

And there are many of these methods.

I will use quite a lot of them and they're not.

Next generation javascript all these methods work in the same way though they take a function as an

input and this function which is an arrow function here but could be a normal function is then simply

executed on each element in the array here.

So on each element in the numbers array, on 1 and 2 and 3.

So therefore what we get in this arrow function is a number in the end.

But you can name this argument whatever you want here.

We can then simply return something.

And what you have to do in this internal function depends on which area of function you are using.

Check the docs in places like d Mozilla Developer Network docs to learn more about the available array

functions.

So in the map function we have to return the new value we want to turn the old one into so we could

return num * 2 and since this is executed on every element here.

It will return 2, 4 and 6 and conveniently map all the returns a new array.

So a real new array which is then stored in doubleNumArray.

So now if I output numbers and thereafter doubleNumArray like this and then I'll hit run you'll see

the old one is unchanged but the new one holds double the values and I will explain what these functions

do when we use them in the course.

I just want to bring them to your attention right now.

Explain that they always have this function which gets executed on each element and that they are not

next generation javascript but normal javascript actually, be prepared to meet them.

I will explain what they do when we see them and always feel free to dive into docs like the Mozilla

developer network to learn more about them.

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