All language subtitles for 014 Annotating Argument Types_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
fa Persian
pl Polish
pt-BR Portuguese (Brazil)
pt Portuguese (Portugal)
pa Punjabi
qu Quechua
ro Romanian
rm Romansh
nyn Runyakitara
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 section, we put together our cards with suit method and we made special use of the wear

function that is included with every list automatically in the section.

We're going to do a very small refactor to this function right here to make use of an abbreviated syntax

for defining functions.

So I want you to notice right now that when we call where we passed in a function that gets called one

time for every element in the array, and we used what is referred to as the long form function syntax

right here, the long form function syntax makes use of these curly braces.

And we also had the return statement in there as well.

Notice how the body of our function really just has one single expression inside of it in a single expression,

just looks at one property and compares it to another.

So this is one single expression.

Because we have one expression inside of here, we can use a slightly abbreviated syntax for defining

this function, so we're going to do the refactor and we'll talk about the differences between the two.

So I'm going to first get started on this refactor by removing the semicolon.

I'll then remove the return statement and I'll put all this stuff on one line.

Like so.

I'll then remove this curly brace on the right hand side, and then I will replace the curly brace on

the left hand side with an equal sign and a greater than sign like.

So oops did not mean to click that.

There we go.

So what we have on the screen right here is completely equivalent to what we had before, so because

we had one single expression, we can make use of this arrow function syntax.

If we had multiple expressions or multiple lines of code, we could not use the abbreviated syntax.

The other thing I want to make clear is that when we use this arrow, we get what's called an implicit

return.

So whatever this expression right here evaluates to will be automatically returned from the function

before us when we had the long form syntax with the curly braces like so we had to manually put in a

return statement.

So because we had a single expression and we made use of the Arrow syntax, we got an automatic return

for free.

So if I now run this code again, you'll notice that I get the same result up here on the top, right,

just like I did before.

We're going to be making use of this abbreviated syntax quite a bit throughout this course and will

sometimes also swap off back to that longer form syntax any time we need to have multiple expressions

inside of our function body.

So we're going to see the syntax quite a bit both ways.

All right.

So we've got a good reflector here.

Let's continue in the next section.

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