- An asynchronous function is a function that operates asynchronously via the event loop, using an implicit Promise to return its result.
- In JavaScript, closures are created every time a function is created, at function creation time (every time you create a function, you are taking a picture of it)
- Every time a function is created, we throw away the old picture and take a new one.
- Closure is a natural result of lexical scope when the language has functions as first-class values.
- When a function makes reference to variables from an outer scope, and that function is passed around as a value and executed in other scopes, it maintains access to its original scope variables - this is closure.
- Across all of programming, but especially in JS, closure drives many of the most important programming patterns, including modules.
- JS is one of very few languages where you have the option to create objects directly and explicitly, without first defining their structure in a class.
-
Notifications
You must be signed in to change notification settings - Fork 1
stepanenko/javascript-info
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
No description or website provided.
Topics
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published