Byte-Sized-Chunks: Closures in Javascript

Use closures with confidence!
4.0 (1 rating) Instead of using a simple lifetime average, Udemy calculates a
course's star rating by considering a number of different factors
such as the number of ratings, the age of ratings, and the
likelihood of fraudulent ratings.
10 students enrolled
$19
$20
5% off
Take This Course
  • Lectures 12
  • Length 2 hours
  • Skill Level All Levels
  • Languages English
  • Includes Lifetime access
    30 day money back guarantee!
    Available on iOS and Android
    Certificate of Completion
Wishlisted Wishlist

How taking a course works

Discover

Find online courses made by experts from around the world.

Learn

Take your courses with you and learn anywhere, anytime.

Master

Learn and practice real-world skills and achieve your goals.

About This Course

Published 3/2016 English

Course 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.

Talk to us!

  • Mail us about anything - anything! - and we will always reply :-)

What are the 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

What am I going to get from this course?

  • Use closures in Javascript with confidence
  • Understand what first class functions are, and why they are important
  • Implement private object properties using closures

What is the target audience?

  • 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

What you get with this course?

Not for you? No problem.
30 day money back guarantee.

Forever yours.
Lifetime access.

Learn on the go.
Desktop, iOS and Android.

Get rewarded.
Certificate of completion.

Curriculum

Section 1: Closures: The Genie is out of the bottle!
You, This Course, and Us!
Preview
01:03
10:24
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.
06:31
Functions are first class citizens, they can be assigned to variables, returned from functions and passed as an argument into functions.
12:35
First class functions mean that we can pass them as arguments to functions.
Example 28: Functions that return functions
08:38
07:31
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.
15:42

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.

18:42

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

08:51

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!

Example 43: Closures with declared functions and function literals
02:27
05:43
The function parameters of the outer function also form part of the referencing environment in the closure.
Example 45: Closure variables cooler than global variables
Preview
13:38

Students Who Viewed This Course Also Viewed

  • Loading
  • Loading
  • Loading

Instructor Biography

Loony Corn, A 4-person team;ex-Google; Stanford, IIM Ahmedabad, IIT

Loonycorn is us, Janani Ravi, Vitthal Srinivasan, Swetha Kolalapudi and Navdeep Singh. Between the four of us, we have studied at Stanford, IIM Ahmedabad, the IITs and have spent years (decades, actually) working in tech, in the Bay Area, New York, Singapore and Bangalore.

Janani: 7 years at Google (New York, Singapore); Studied at Stanford; also worked at Flipkart and Microsoft

Vitthal: Also Google (Singapore) and studied at Stanford; Flipkart, Credit Suisse and INSEAD too

Swetha: Early Flipkart employee, IIM Ahmedabad and IIT Madras alum

Navdeep: longtime Flipkart employee too, and IIT Guwahati alum

We think we might have hit upon a neat way of teaching complicated tech courses in a funny, practical, engaging way, which is why we are so excited to be here on Udemy!

We hope you will try our offerings, and think you'll like them :-)

Ready to start learning?
Take This Course