#DailyQuiz - Question 23 | Everyday JavaScript | Object.fromEntries and Object.entries

preview_player
Показать описание
Hello Everyone,
In this playlist, I am going to ask you a question everyday at 12 noon. Please leave your answer in the comments section.

Please do like, subscribe and share my channel:

#JavaScript #DailyQuiz #RecentlyUploaded #JavaScriptInterviewQuestions

Рекомендации по теме
Комментарии
Автор

a. {name: 'Bob', age: 25}
Object.fromEntries reverses the effects of Object.entries. Object.entries takes an object as parameter and returns a nested array of key-value pairs. In this example it returns the following array [["name", "Bob"], ["age", 25]] which it creates from the object {name: 'Bob', age: 25}
Object.fromEntries takes this nested array as parameter, then creates an object out of it and returns the same. In this example it returns the object {name: 'Bob', age: 25} which it creates from the array [["name", "Bob"], ["age", 25]]

sandip_bettereveryday