All language subtitles for 4- Dynamic Typing

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

Original subtitles

One thing that separates JavaScript

from a lot of programming languages, is that JavaScript is a dynamic

language. What do I mean by dynamic? Well,

we have two types of programming languages. Static languages or

dynamic languages. In static languages, when we declare a

variable, the type of the variable is set and it cannot be changed

in the future. In a dynamic language like JavaScript,

the type of a variable can change at run time. Let's see this

in code. So back in the example from the last lecture we have declared

this name variable, and we have set that to a string, so

the type of name is currently a string, but it can change in the future.

Let's take a look. So here in the console, we can execute some JavaScript

code, we have this type of operator,

and with that we can check the type of a variable. So after that

we add the name of the variable. In this case the name variable

So note that the type of name is a string. So,

if you reassign name to a different value, like a number,

and check it's type,

look, the type is now changed to a number, this is what we call

a dynamic language, so unlike static languages the type of

these variables will be determined at runtime based on the values

that we assigned to them. Now, let's take a look at a few more examples of the type

of operator. And by the way, note that type of is

another reserved keyword, so we cannot have a variable called

type of. So, we can clear the console by

pressing control and L. So now let's take a look at

the type of age, it's a number. Now if we change

age to a floating point number, and I know it doesn't make sense, but

let's just stick to this for example, 30.1,

and then look at type of age, it's still a

number. So in JavaScript, unlike other programming languages

we don't have two kinds of numbers, we don't have floating point numbers

and integers, all numbers are of type number.

Now, let's look at the type of is approved, it's a

boolean as I told you before, what about the first name, let's have a

look. Type of, first name. It's undefined.

And that's funny, because the value of this variable is undefined

but it's type is also undefined. What does this mean?

Well, earlier I told you that we had two categories of types,

we have primitives or value types, and reference types.

In the primitive types category, we have strings, numbers,

booleans undefined and null. So undefined

is actually a type, but it's also a value.

In this example, because we have set first name,

to undefined as a value it's type is also

undefined, okay? But what about selected color.

Let's have a look, so type of selected color.

The type of this variable is an object.

What is an object? That's a topic for the next lecture.

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