1
00:00:02,070 --> 00:00:09,660
Javascript is a dynamic, interpreted programming language but it's also a weakly typed programming language.

2
00:00:09,660 --> 00:00:11,290
Now what does this mean?

3
00:00:11,340 --> 00:00:17,220
For one, the dynamic interpreted part as you learned means that it's not pre-compiled, other languages like

4
00:00:17,220 --> 00:00:21,080
C++ are compiled during or after development,

5
00:00:21,150 --> 00:00:27,450
so before you share them with the end users, Javascript is on-the-fly compiled and that means that the

6
00:00:27,450 --> 00:00:30,210
code is evaluated and executed at runtime,

7
00:00:30,210 --> 00:00:33,450
it also means that the code can change at runtime.

8
00:00:33,480 --> 00:00:39,430
Now of course not the code you wrote and it won't magically change, of course the code you wrote gets executed

9
00:00:39,630 --> 00:00:45,000
but in that code, you can do some things which you are not allowed to do in other programming languages,

10
00:00:45,030 --> 00:00:49,500
for example if you're working with a variable, something we will only learn in the second module,

11
00:00:49,500 --> 00:00:53,700
for now you can just keep in mind that a variable is a data container,

12
00:00:53,880 --> 00:01:00,000
you might store let's say some text in there, text you need in your script to for example output it to

13
00:01:00,000 --> 00:01:06,300
the user. In Javascript you are allowed to dynamically switch the type of data there. In a variable, you

14
00:01:06,300 --> 00:01:11,910
might start by storing some text and suddenly at a later point of time, you store a number in there instead,

15
00:01:12,090 --> 00:01:13,860
in the same variable.

16
00:01:13,860 --> 00:01:16,560
Now again, we haven't really learned about variables yet,

17
00:01:16,680 --> 00:01:23,070
we will of course do that but the one thing you can simply keep in mind is that the dynamic thing in

18
00:01:23,070 --> 00:01:30,030
Javascript means that it is parsed and interpreted and compiled at runtime and that therefore it is

19
00:01:30,030 --> 00:01:31,590
able to do certain things,

20
00:01:31,590 --> 00:01:37,560
for example switching the data of a variable other programming languages are not allowed to do.

21
00:01:37,680 --> 00:01:44,370
Now it's not necessarily good to switch the type of data dynamically or unexpectedly but you can do

22
00:01:44,370 --> 00:01:44,900
that,

23
00:01:44,910 --> 00:01:51,560
the main takeaway however is the on-the-fly compilation and interpretation. Now what about the weakly

24
00:01:51,560 --> 00:01:53,880
typed part here?

25
00:01:53,900 --> 00:02:01,820
This means that when we work with data in Javascript, for example text data or numbers, you don't have

26
00:02:01,820 --> 00:02:07,580
to tell Javascript that you're going to work with a text now or you're going to work with a number now,

27
00:02:07,760 --> 00:02:08,270
instead

28
00:02:08,270 --> 00:02:14,540
data types are assumed, are inferred automatically so to say, that's also related to this dynamic

29
00:02:14,540 --> 00:02:19,750
nature where data types can also change from one line to another.

30
00:02:19,760 --> 00:02:26,180
Now this might sound strange but in other programming languages, you have to define the type of data

31
00:02:26,810 --> 00:02:33,250
a variable will hold in advance. In Javascript, that's not the case, you don't have to tell Javascript

32
00:02:33,460 --> 00:02:40,870
that this variable, this data container will hold a number, instead you store a data in there and if that

33
00:02:40,870 --> 00:02:46,550
happens to be a number, so it is. In other programming languages, you have to tell the language that you're

34
00:02:46,570 --> 00:02:47,930
going to store a number in there

35
00:02:48,010 --> 00:02:50,490
and if you store something else, you would get an error.

36
00:02:50,500 --> 00:02:55,930
That's not the case in Javascript, it's forgiving there because it's dynamic and it also doesn't care

37
00:02:55,930 --> 00:02:58,620
about strong type definitions in advance,

38
00:02:58,630 --> 00:03:04,840
instead you just store data in there and go with every type of data that holds. So data types are not

39
00:03:04,840 --> 00:03:07,060
set in stone but can change.

40
00:03:07,060 --> 00:03:09,310
Now this is arguably a bit more advanced,

41
00:03:09,370 --> 00:03:15,190
I just want you to be aware of these terms, dynamic and weakly typed right now and they will make more

42
00:03:15,190 --> 00:03:20,030
and more sense as we progress throughout this course and work with data and variables.

43
00:03:20,140 --> 00:03:22,110
For now, just be aware of these terms.
