DEV Community

Discussion on: ES2019 new features

Collapse
 
axelledrouge profile image
AxelleDRouge • Edited

Hello thanks for the article. Indeed these methods should be really useful.

Just warning, I believe you have two typos :
in your description of Object.fromEntries

var carArr = [['make', 'Volvo], ['seats', 4], ['year', 2018]];
console.log(Object.fromEntries(carArr)); // { make: 'Volvo', seats: 4, year: 2018 };

one of the quote is missing :

var carArr = [['make', 'Volvo'], ['seats', 4], ['year', 2018]];
console.log(Object.fromEntries(carArr)); // { make: 'Volvo', seats: 4, year: 2018 };

and in the Symbol description :

var symbolDesc = 'This is Symbol';
var symbolObj = Symbol(symbolObj);
console.log(symbolObj.description); // 'This is Symbol';

It should be (but I may be wrong as I don't really know Symbol):

var symbolDesc = 'This is Symbol';
var symbolObj = Symbol(symbolDesc);
console.log(symbolObj.description); // 'This is Symbol';