Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This was a nice read, well-written and informative!

I could add that in my mental model, the reason that an object property with an undefined value is different from an actually undefined property, is that since JS objects are basically key/value maps, there is a difference between a key existing with an undefined value and the key itself not existing at all.



Also if missing and undefined where the same it would change how prototype inheritance worked (maybe for the better)


The Json serialisation and serialisation of undefined fields is a bug then? Since it changes the meaning.


Json doesn’t have notion of undefined value anywhere, only null and absence can be encoded.


No. JSON is a subset of JavaScript.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: