Byte-Sized-Chunks: Closures in Javascript
4.0 (16 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
2,403 students enrolled

Byte-Sized-Chunks: Closures in Javascript

Use closures with confidence!
4.0 (16 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
2,403 students enrolled
Created by Loony Corn
Last updated 3/2016
English
English [Auto]
Current price: $64.99 Original price: $99.99 Discount: 35% off
2 days left at this price!
30-Day Money-Back Guarantee
This course includes
  • 2 hours on-demand video
  • 18 downloadable resources
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion
Training 5 or more people?

Get your team access to 4,000+ top Udemy courses anytime, anywhere.

Try Udemy for Business
What you'll learn
  • Use closures in Javascript with confidence
  • Understand what first class functions are, and why they are important
  • Implement private object properties using closures
Course content
Expand 12 lectures 01:51:45
+ Closures: The Genie is out of the bottle!
12 lectures 01:51:45
Properties are public by default, however it's often useful to have private properties. These are not natively supported in JS but we can fake them.
Example 26: Faking Public and Private Properties
10:24
Functions are first class citizens, they can be assigned to variables, returned from functions and passed as an argument into functions.
Preview 06:31
First class functions mean that we can pass them as arguments to functions.
Example 27: Functions as arguments to functions
12:35
Example 28: Functions that return functions
08:38
Numbers and strings are pass by value, which means that any modifications to their values in the functions are not reflected in the calling code.
Example 29: Arguments pass by value to functions
07:31

Arrays and objects are pass by reference, this means that modifications within functions are reflected in the calling code. But not reassignments! What's the difference? This lecture explains it all.

Example 30: Arguments pass by reference
15:42

Closures are mind-bendingly awesome. Each function carries around with it the context in which it was created!

Preview 18:42

Closure variables have precedence over local as well as global variables. You can't control the value of a variable that a nested functions sees!

Preview 08:51
Example 43: Closures with declared functions and function literals
02:27
The function parameters of the outer function also form part of the referencing environment in the closure.
Preview 05:43
Requirements
  • Any modern browser and a simple text editor are all that will be needed for the code examples
  • Some prior programming experience will definitely help
Description

Note: This course is a subset of our much longer course 'Learn By Example: HTML, CSS and Javascript' so please don't sign up for both:-)

Closures and first class functions in Javascript - that's what this course is about.

This is not a course on Javascript frameworks - its about solid, fundamental Javascript. You'll be surprised by how much more you can get done on your web pages once you learn this the right way.

What do we mean by that?

  • Relatively few folks formally learn HTML, CSS or Javascript, because its quite easy to get stuff done in these technologies in a "quick-and-dirty way".
  • That "quick-and-dirty" way of learning and doing leads to problems over time, because Javascript and CSS are actually quite complex, so it is easy to do things the wrong way
  • This course will help, because it is entirely based on examples . Each is self-contained, has its source code attached, and gets across a simple, specific use-case. Each example is simple, but not simplistic.

What's Included:

  • Closures in Javascript are a rather mind-bending concept - functions that "remember" how the world looked when they were created.
Who this course is for:
  • Nope! Please don't enroll for this class if you have already enrolled for our 13-hour course 'Foundations of HTML, CSS and Javascript' course
  • Yep! Folks who are seeking to learn Javascript the right way - including folks who may done some Javascript programming, but are not quite confident using closures