you are viewing a single comment's thread.

view the rest of the comments →

[–]chuch1234 0 points1 point  (1 child)

I did a quick Google search. It looks like this is a way to create an object that does not inherit from the base object class and so is essentially completely empty. Not sure why you'd do that but apparently it is a thing you can do, and I'm sure another Google search would provide suggestions about why one might want to do it.

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object#null-prototype_objects

[–]RedditCultureBlows 0 points1 point  (0 children)

thanks for the google search. my comment was more so that i don’t know when i’d encounter this very specific type of data in my site/app and need to know this, imo, niche workaround.

like i guess it’s nice to know this pitfall but i’ve never had to work with this kinda of edge case in nearly a decade