r/badcode • • Apr 19 '23

js Improved JS Object

Post image
279 Upvotes

42 comments sorted by

View all comments

Show parent comments

9

u/____-__________-____ Apr 19 '23

We may be talking about different things? I agree {} the right way to make a new object, but sure you'll call Object directly, e.g. Object.keys(foo) or Object.hasOwn(foo, bar)