Make an empty object in JavaScript


/ Published in: JavaScript
Save to your folder(s)

`Object.create(null)` is a more memory-efficient way to make objects, but it's not supported in all versions of JavaScript, so you can do the "old-fashioned" `{}` if that function isn't available.

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.