1
00:00:00,000 --> 00:00:05,286
Hi everyone. I'm Prateek. Welcome to this

2
00:00:05,286 --> 00:00:07,222
course on JavaScript functions. This

3
00:00:07,222 --> 00:00:08,778
course will teach you how to write

4
00:00:08,778 --> 00:00:11,500
modular, concise, and reasonable code with

5
00:00:11,500 --> 00:00:13,667
functions. Before we dive in, let's review

6
00:00:13,667 --> 00:00:16,000
what we'll be covering in this module.

7
00:00:16,000 --> 00:00:19,250
First, we'll learn what a function is, why

8
00:00:19,250 --> 00:00:21,714
we use them, and how to write and run

9
00:00:21,714 --> 00:00:24,800
them. Next, we introduce arguments and how

10
00:00:24,800 --> 00:00:27,600
they let us pass information to our

11
00:00:27,600 --> 00:00:29,000
functions. We also cover how the variables

12
00:00:29,000 --> 00:00:32,333
in a function are scoped and how to access

13
00:00:32,333 --> 00:00:35,000
them correctly. Then, we look at

14
00:00:35,000 --> 00:00:37,000
immediately invoked function expression,

15
00:00:37,000 --> 00:00:39,333
also known as the IIFE pattern, and

16
00:00:39,333 --> 00:00:41,500
compare it with regular functions. Next,

17
00:00:41,500 --> 00:00:44,455
we introduce closures. A closure is a

18
00:00:44,455 --> 00:00:47,000
combination of a function and its context.

19
00:00:47,000 --> 00:00:49,000
The context contains the variables defined

20
00:00:49,000 --> 00:00:51,800
in the function, as well as those that are

21
00:00:51,800 --> 00:00:54,600
visible to the function when it was first

22
00:00:54,600 --> 00:00:57,545
defined. We look into in more detail later

23
00:00:57,545 --> 00:01:00,714
on in the module. Finally, this course is

24
00:01:00,714 --> 00:01:03,250
full of demos, so I really encourage you

25
00:01:03,250 --> 00:01:06,000
to code along. The more you practice, the better you will understand these concepts.

