From the course: Master Next.js: Elaborate Hands-On Web Development, React Basics, Advanced Next.js, and Deployment
Unlock this course with a free trial
Join today to access over 25,200 courses taught by industry experts.
Advanced closure module pattern with data privacy encapsulation
From the course: Master Next.js: Elaborate Hands-On Web Development, React Basics, Advanced Next.js, and Deployment
Advanced closure module pattern with data privacy encapsulation
Okay, let's reinforce a more advanced understanding of closures, because closures are so important in my opinion, that you wrap your head around it and get extra practice. So we're going to get deeper. So it's optional to do this, but if you really want to give it a go, then stick with me here because we're going to really focus on data privacy and closures in this video. So let's make a new file and we're going to call this closures-advanced. If I can spell, you got to spell advanced to be advanced. That's the first step. We're going to use the example that the MDN WebDocs provide, so their official example. We'll go through it together, but then we're going to get much deeper with it. I'm going to take it to the next level with you because I don't think their example goes deep enough. All right, so we're going to create, basically, we'll have an expressive function, so we'll call it createPet, which is going to have a function, anonymous function. It's going to take an input as a…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
(Locked)
Download Node.js and what is Node.js?2m 23s
-
(Locked)
Setting up our learning environment5m 42s
-
(Locked)
What are functions in JavaScript?9m 42s
-
(Locked)
Example of how functions work in JavaScript for complete beginners9m 18s
-
(Locked)
What are function expressions in JavaScript?9m 28s
-
(Locked)
JavaScript interview question trick with function expressions and utility fun16m 14s
-
(Locked)
What is function hoisting in JavaScript?6m 37s
-
(Locked)
How scope works in JavaScript15m 53s
-
(Locked)
What are closures and an example with JavaScript explained?11m 49s
-
(Locked)
Advanced closure module pattern with data privacy encapsulation15m 16s
-
(Locked)
What are arrow functions and usefulness in React?17m 13s
-
(Locked)
Destructuring with JavaScript23m 1s
-
(Locked)
-
-
-
-
-
-
-
-