https://github.com/swanie21/module-3-prework
Learn about Lodash, express.js, JS promises, and JS scope/chains/closures over intermission break
https://github.com/swanie21/module-3-prework
chains closure express lodash promises scope
Last synced: 8 months ago
JSON representation
Learn about Lodash, express.js, JS promises, and JS scope/chains/closures over intermission break
- Host: GitHub
- URL: https://github.com/swanie21/module-3-prework
- Owner: swanie21
- Created: 2016-09-28T17:29:29.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2016-09-28T21:51:55.000Z (about 9 years ago)
- Last Synced: 2025-01-08T16:06:41.235Z (10 months ago)
- Topics: chains, closure, express, lodash, promises, scope
- Language: JavaScript
- Homepage:
- Size: 7.81 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Module 3 Prework
## Lodash
Lodash is a JavaScript utility library that enhances performance and functionality with arrays, objects, and strings. An underscore prepends the method like this: `_.filter.`
## Express.js
Express.js is a minimal and flexible Node.js web application framework. It simplifies development and reduces repetitive code.
## JavaScript Promises
Promise object is used for asynchronous successes and failures. A promise can have the state of being fulfilled, rejected or pending. A promise takes in one argument, a callback with the two parameters of resolve and reject, and performs something within the callback that invokes the parameters.
## Scope
Scope is the context of your code dependent upon whether a variable is declared inside or outside a function. Scope can either be global or local.
Lexical Scope is when a function is within another function and the inner function has access to the scope of the outer function. (aka: Static Scope)
## Scope Chains
Scope chains establish the scope for a given function by determining nested scopes and what scope is associated with what function. The scope chain starts at the innermost scope and works its way outwards.
## Closures
Closures are created when a function is within another function and the inner function has access to the outer function's variables and parameters. A closure has three scope chains: access to its own scope, access to the outer function's variables, and access to the global variables.