DEV Community

loading...

ES7 LATEST Object.entries

Shuhaib zahir
・1 min read

var person = { fname: "Hemanth", lname: "HM", location: "Earth", type: "Human" };

Object.entries(person);

//^ [["fname","Hemanth"],["lname","HM"],["location","Earth"],["type","Human"]]

Discussion (0)