A Wee Catch Up On the Language
you Thought you Knew
Let's Begin! (Space or Arrow Keys to Navigate)
JavaScript Joins the ranks of other languages with block scoping
let
and const
New keywords for declaring block-scoped mutable and immutable variables
A concise way to define function expressions
this
Bindingthis
is a notoriously cryptic keyword in JavaScript
Arrow functions provide a more predictable behaviour for this
Destructuring lets us describe the structure of data while simultaneously assigning names to its members
It reduces the surface area for bugs, encourages immutable flows, and reduces boilerplate when defining functions
When initializing objects, if you have a variable with the same name as one of your keys, you can skip the assignment
Prior to ES2015, we couldn't initialize a new object with dynamic keys
class
KeywordLet's get one thing very clear: JavaScript does not have classes - Not then, and not now. The class
keyword simply helps us write object constructors with their prototype methods more concisely
A promise is a container (monad) for a future value. You can unwrap the value with the then
method, or the error state with the catch
method
async
FunctionsSyntactic sugar for promise flows that makes async code look sync
Async functions always return promises, and any errors thrown will reject the promise
Thanks For
Watching!
Read More