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';
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
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';