ProfNandaa
7/17/2017 - 8:26 AM

ES6+ snippets

ES6+ snippets

// Converting an object to a map
// use Object.entries to generate the key value pair arrays

let person = {
  name: 'Anthony',
  age: 21,
  country: 'KE'
};

let pMap = new Map(Object.entries(person));

ES6+ Code Snippets

On this Gist, I will be highlighting some of the interesting features through short code snippets (Cookbook recipes).