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.diron a function to see
- Also object, use
thiskeyword (assigned at runtime)- window (browsers) / global (node)
- object definition
- callback (setTimeout for example)
- function() {}.bind()
newkeyword (constructor functions)- Binds a new object ({}) to
this - Sets the
__proto__of that object to the functionsprototypeobject - 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
prototypeobject 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
windowobject namespace instead- Order matters!
- NodeJS uses CommonJS:
module.exportsandrequire- 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
browserifyto use modular code in the browser- Uses closures to keep the namespace clean
- Browserify uses
transforms
- Using
webpackinstead 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 video in
this:https://youtu.be/zE9iro4r918