Blog

6
Jul

Freebie – Organizational Chart

Download it here for Free https://bit.ly/freebie-chart-zip

12
Jun

Using Getters and Setters

https://youtu.be/4pOKvSL-zsU   const laptop = { Processor: ‘Snapdragon 835′, Ram: ’24GB’, // specs : function() {} // function specs() {}; // specs() {} // specs() { // return `${laptop.Processor} ${laptop.Ram}` // } // } get specs() { return `${laptop.Processor} ${laptop.Ram}` }, set specs(newValue) { this.Processor = newValue; // const names = newValue.split(”); // this.Processor = names[0]; // this.Ram = names[1]

Read more

5
Jun

Class Syntax and Constructor Method

// `var Laptop = function(targetPlanet){ // this.name = name; // } // var jebbel = new Laptop(‘TBook’);` class Laptop { constructor(name) { this.model = name; } } const myLaptop = new Laptop(‘Macbook 15-inch 2018’); // console.log(“myLaptop”, myLaptop); console.log(myLaptop)

1
Jun

Concise Function Declaration in ES6

https://youtu.be/zujQUbSTtoI   const SHOP = { sales: 100, updatedSales(newSalesFigure) { this.sales = newSalesFigure; } }; SHOP.updatedSales(133); console.log(SHOP.sales);

1
Jun

Concise Object Literal Declaration using Object Property Shorthand

https://youtu.be/DtAYS00P9H8   const ARRAY = [a, b, c, d]; const WHATISTHIS = { r, h, n, s }; const WHATISTHIS = { r: r, h: h, n: n, s: s };

29
May

Using Destructuring Assignment to Assign Variables to Arrays

const [i, x, z] = [4, 9, 3, 9, 0, 1]; console.log(i, x, z); const [i, , x, , , z] = [4, 9, 3, 9, 0, 1]; console.log(i, x, z);

29
May

Using Destructuring Assignment to Assign Variables from NESTED Object

  // const CLIENT = { paymentMethod: ‘PayPal’, amount: 200 }; // const CLIENT = { // paymentMethod: ‘PayPal’, // amount: 200 // }; // const CLIENT = { // paymentMethod: {first: ‘PayPal’; second: ‘Payoneer’}, // amount: 200 // }; const CLIENT = { paymentMethod: { first: ‘PayPal’, second: ‘Payoneer’ }, amount: 200 }; //Accessing Values of Nested Objects //

Read more

29
May

Using Destructuring Assignment to Assign Variables from an Object

const CLIENT = { paymentMethod: ‘PayPal’, amount: 200 }; //ES6 Code const { paymentMethod: payMethod, amount: dollar } = CLIENT; // console.log(“paymentMethod”, paymentMethod); // console.log(“amount”, amount); console.log(“payMethod”, payMethod); console.log(“dollar”, dollar);

29
May

Using Destructuring Assignment to Extract Values from an Object

const CLIENT = { paymentMethod: ‘PayPal’, amount: 200 }; // ES5 Code // const paymentMethod = CLIENT.paymentMethod; // const amount = CLIENT.amount; // console.log(“paymentMethod”, paymentMethod); // console.log(“amount”, amount) //ES6 Code const { paymentMethod, amount } = CLIENT; console.log(“paymentMethod”, paymentMethod); console.log(“amount”, amount)

29
May

Spread Operator

  const ARRAY = [5, 83, 02, 900]; const MAXIMUM = Math.max(…ARRAY); const ARRAY2 = …ARRAY; console.log(“MAXIMUM”, MAXIMUM)