← BYTES
JavaScript·Intermediate·Ref: 3.2.16
What does `Object.entries({a: 1, b: 2})` return?
Have a question about this video? Mention reference 3.2.16 when you contact us.
a.["a", "b"]
b.[["a", 1], ["b", 2]]
c.[1, 2]
d.{a: 1, b: 2}
`Object.entries()` returns an array of [key, value] pairs for the object's own enumerable properties, which is particularly useful for feeding an object into a `for...of` loop or converting it into a Map.
Find this on YouTube & Instagram
Every BYTES video is tagged with its reference number and topic — search any of these on YouTube or Instagram to find this one:
#BYTES#BYTES3216#JavaScript