Last active
May 26, 2019 13:48
-
-
Save jkasaudhan/90bc281d575d2dafb3c6c038b629116c to your computer and use it in GitHub Desktop.
Object.fromEntries() property
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Transforms array or any iterables of [key, value] pairs into object | |
const entries = [['name', 'JK'], ['age', '30']]; | |
Object.fromEntries(entries); | |
// {name: "JK", age: "30"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment