A list of things to learn / talk about in order to learn the fundamentals of JavaScript and modern tools for dev
- Initially released in 1995
- Based on Scheme, bent to look like Java (because it was cool at the time)
- Standardized as ECMAScript, by TC39
- JavaScript is a language implementation based on the ECMAScript standard
- Now its everywhere!
- Everything is an object
- Objects (not classes)
- Functions
- Also object, use
console.dir
on a function to see
- Also object, use
this
keyword (assigned at runtime)- window (browsers) / global (node)
- object definition
- callback (setTimeout for example)
- function() {}.bind()
new
keyword (constructor functions)- Binds a new object ({}) to
this
- Sets the
__proto__
of that object to the functionsprototype
object - Implicitly returns that new object
- Binds a new object ({}) to
- Prototypal inheritance
- All objects have a
__proto__
to lookup when a property is not found - Functions also have a
prototype
object for constructors
- All objects have a
- ES6 classes (more on that later)
- Constructors are JavaScripts version of classes
- Using a
<script>
tag - Modularizing by using many
<script>
tags - Poluting the global namespace, use a
window
object namespace instead- Order matters!
- NodeJS uses CommonJS:
module.exports
andrequire
- module.exports: default vs named
- There is also AMD, UMD and RequireJS
- Modules in the browser would good... theres a package for that
- NPM
- Yarn
- Using
browserify
to use modular code in the browser- Uses closures to keep the namespace clean
- Browserify uses
transforms
- Using
webpack
instead ofbrowserify
- Webpack uses
loaders
- Does more: code splitting, more specific config, etc.
- Webpack uses
- ES5
- ES6/ES2015, ES7/ES2016, ESNext
- Primer
- Var, let, const
- Template strings
- Concise object methods
- Arrow functions
- Destructuring
- Modules (instead of CommonJS)
- Primer
- Babel
- REPL, browserify tranform, webpack loader
- create-react-app
- Functional components
- JSX
- Props
- Stateful components with ES6 classes
- Immutable State
Good videos on prototypes, etc., etc.
https://www.youtube.com/channel/UCO1cgjhGzsSYb1rsB4bFe4Q