Day27: 16 August 2020
Template Literals allow us to use a simple syntax to create a complex string.
Like C/C++, we also have the option to create an object using the constructor, and we also have getter/setter functions to retrieve or change the value.
New keywords like import/export allow us to only use the function we need from another file.
Promiseobject represents the eventual completion (or failure) of an asynchronous operation, and its resulting value.
A Promise, is a constructor function. When a Promise completes its task, if it succeeds then it calls a resolve function, otherwise, when it fails, it calls a reject function. We can handle both using the functions then and catch.
- Create Strings using Template Literals
- Write Concise Object Literal Declarations Using Object Property Shorthand
- Write Concise Declarative Functions with ES6
- Use class Syntax to Define a Constructor Function
- Use getters and setters to Control Access to an Object
- Create a Module Script
- Use export to Share a Code Block
- Use * to Import Everything from a File
- Create an Export Fallback with export default
- Import a Default Export
- Complete a Promise with resolve and reject
- Handle a Fulfilled Promise with then
- Handle a Rejected Promise with catch
Confused by the ES6 syntax.
I need more practice.
**Link to tweet:**