Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to check wether the property exist in a object in java script

if (obj.hasOwnProperty('prop')) {
    // do something
}
 
PREVIOUS NEXT
Tagged: #check #wether #property #exist #object #java #script
ADD COMMENT
Topic
Name
5+6 =