fullstack_webdev

Code and notes from Full stack web developer path, LinkedIn Learning.

View on GitHub

04. Learning ECMAScript ES6+

00. Introduction


01. What is ECMAScript ?

01_01 What is ECMAScript?

01_02 Staying Up to date with the new releases

01_03 Understanding Browser Support


02. ECMAScript Variables and Data Structures

02_01 Using the let keyword || 02_02 Const keyword

02_03 Writing Template Strings/Literals

02_04 Searching Strings

02_05 Using symbols

02_06 Writing Maps

02_07 Working with Sets


03. Arrays and Array Methods

03_01 Using the array spread operator

03_02 Destructuring arrays

// Old method of creating arrays and accessing them by index
let cities = ["DC", "LA", "CA", "NY", "FL"];
console.log(cities[0]); // O/p: DC
// --------------------------------------
// Using destructuring
let [first, second, ...rest] = ["DC", "LA", "CA", "NY", "FL"];
console.log(first); // O/p: DC
console.log(second); // O/p: LA
console.log(rest); // O/p: ["CA", "NY", "FL"]
// To see the fifth item directly, put commas in the places you don't want a name to assign to
let [, , , , fifth] = ["DC", "LA", "CA", "NY", "FL"];
console.log(fifth);

03_03 Searching arrays with the .includes function

// Old method of creating arrays and accessing them by index
let cities = ["DC", "LA", "CA", "NY", "FL"];
console.log(cities.includes("DC")); // True
console.log(cities.includes("Tel-Aviv")); // False

04. ECMAScript Objects

04_01 Enhancing Object Literals

function skier(name, sound) {
  return {
    name: name,
    sound: sound,
    powederYell: function () {
      let yell = this.sound.toUpperCase();
      console.log(`${yell}! ${yell}!`);
    },
  };
}

skier("John", "arghh").powederYell();

04_02 Creating Objects with Spread Operator

04_03 Destructuring Objects

04_04 Iterating with the for/of loop

04_05 Classes in JS && 04_06 Inheritance in JS Classes

04_07 Getting and setting class values


  1. ECMAScript Functions

05_01 Using the string.repeat() function

05_02 & 05_03 Setting default function parameters & Arrow functions

05_04 Understanding this in arrow functions

05_05 Generators

// director generator function will do a countdown for us.
function* director() {
  yield "Three";
  yield "Two";
  yield "One";
  yield "Action";
}
let countdown = director();
console.log(countdown.next().value);
console.log(countdown.next().value);
console.log(countdown.next().value);
console.log(countdown.next());
console.log(countdown.next());


6. Asynchronous JavaScript

06_01 Building Promises

06_02 Loading Remote Data with Promises

06_03 Returning promises with fetch

06_04 Using async/await syntax

Incroporate fetch with async/await


07. Conclusion