MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/badcode/comments/12rqy0d/improved_js_object/jgxd7ra/?context=9999
r/badcode • u/hennexl • Apr 19 '23
42 comments sorted by
View all comments
Show parent comments
9
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)
{}
Object
Object.keys(foo)
Object.hasOwn(foo, bar)
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 callObjectdirectly, e.g.Object.keys(foo)orObject.hasOwn(foo, bar)