Your examples here will check if the property exists in the object itself OR in its prototype chain. To check if the property is on the object itself, you could check if it appears in Object.keys(obj), or use .hasOwnProperty(key) on the Object itself
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.
Your examples here will check if the property exists in the object itself OR in its prototype chain. To check if the property is on the object itself, you could check if it appears in
Object.keys(obj)
, or use.hasOwnProperty(key)
on the Object itself