Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

delete object property vs undefined assignment javascript

a.x = undefined
a.hasOwnProperty("x") // returns true

delete a.x
a.hasOwnProperty("x") // returns false
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #delete #object #property #undefined #assignment #javascript
ADD COMMENT
Topic
Name
5+3 =