typeofnull// 'object'Object.keys(null)// Uncaught TypeError: Cannot convert undefined or null to object
While this is by design and therefore not a bug, I think this combination of behaviours is what makes for a very bad design. If nullis an object, then it should behave like one.
Some comments have been hidden by the post's author - find out more
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
While this is by design and therefore not a bug, I think this combination of behaviours is what makes for a very bad design. If
nullis an object, then it should behave like one.