1
00:00:00,051 --> 00:00:02,825
That's it for this module. Let's summarize

2
00:00:02,825 --> 00:00:05,804
what we've learned. This will help you

3
00:00:05,804 --> 00:00:08,442
remember and solidify your learning. We

4
00:00:08,442 --> 00:00:11,267
first saw template literals that helped to

5
00:00:11,267 --> 00:00:13,341
make strings more readable and useful. The

6
00:00:13,341 --> 00:00:15,741
syntax of a template literal is to use

7
00:00:15,741 --> 00:00:17,755
backticks and a dollar sign and curly

8
00:00:17,755 --> 00:00:21,021
braces for values that you want to insert.

9
00:00:21,021 --> 00:00:23,135
You can easily format your template by

10
00:00:23,135 --> 00:00:26,001
creating new lines in code, which are

11
00:00:26,001 --> 00:00:28,419
preserved in the rendering. We've also

12
00:00:28,419 --> 00:00:30,320
seen that we can tag template literals by

13
00:00:30,320 --> 00:00:32,712
putting a function in front of them, like

14
00:00:32,712 --> 00:00:35,331
this. This function gets the strings and

15
00:00:35,331 --> 00:00:37,971
the values in the template as an array.

16
00:00:37,971 --> 00:00:39,874
This allows you to do something with the

17
00:00:39,874 --> 00:00:42,493
template before you return it. And when

18
00:00:42,493 --> 00:00:44,534
you don't want to escape characters, you

19
00:00:44,534 --> 00:00:48,179
can use String.raw. You can use it as a

20
00:00:48,179 --> 00:00:50,745
tag for a template literal, and you can

21
00:00:50,745 --> 00:00:52,796
also use the strings.raw array that you

22
00:00:52,796 --> 00:00:55,853
get in a template tag function. We've seen

23
00:00:55,853 --> 00:00:59,550
that both let and const can have a block

24
00:00:59,550 --> 00:01:02,021
scope and that variables that are declared

25
00:01:02,021 --> 00:01:04,627
with var cannot. Let variables can be

26
00:01:04,627 --> 00:01:06,991
reassigned another value in their scope,

27
00:01:06,991 --> 00:01:10,001
but can't be redeclared in their scope.

28
00:01:10,001 --> 00:01:13,438
Const variables cannot be reassigned or

29
00:01:13,438 --> 00:01:15,506
redeclared. The value that they are

30
00:01:15,506 --> 00:01:17,661
assigned to can be changed, like a

31
00:01:17,661 --> 00:01:19,865
property in an object, but their

32
00:01:19,865 --> 00:01:22,519
assignment to the object cannot be

33
00:01:22,519 --> 00:01:24,763
changed. You use var, let, and const to

34
00:01:24,763 --> 00:01:27,508
indicate your intentions for the variable

35
00:01:27,508 --> 00:01:30,321
as readability helpers. Finally, we've

36
00:01:30,321 --> 00:01:33,481
seen the destructuring syntax. This can

37
00:01:33,481 --> 00:01:35,543
destruct an array and an object into

38
00:01:35,543 --> 00:01:38,536
distinct variables using this syntax. You

39
00:01:38,536 --> 00:01:41,696
can also use default values, and this

40
00:01:41,696 --> 00:01:44,266
syntax can be spread over multiple lines

41
00:01:44,266 --> 00:01:46,769
in code. All right, by now you might be

42
00:01:46,769 --> 00:01:49,354
wondering where to go to learn more about

43
00:01:49,354 --> 00:01:51,730
these topics. I found the following

44
00:01:51,730 --> 00:01:54,358
resources very useful. First is the MDN

45
00:01:54,358 --> 00:01:57,383
web docs from the Mozilla Developer

46
00:01:57,383 --> 00:02:00,571
Network. These are very in depth. Also,

47
00:02:00,571 --> 00:02:03,991
the W3Schools documentation is very good.

48
00:02:03,991 --> 00:02:06,154
You should check that out. And finally, I

49
00:02:06,154 --> 00:02:08,488
would recommend that you explore this

50
00:02:08,488 --> 00:02:11,174
Pluralsight course by Kyle Simpson. In

51
00:02:11,174 --> 00:02:12,798
this course, you can learn more about the

52
00:02:12,798 --> 00:02:15,547
topics that we've talked about in this

53
00:02:15,547 --> 00:02:20,000
module. All right, ready for the next module. Let's go.

