Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

check if key does not exists in dictionary javascript

var person={"name":"Billy","age":20}
person.hasOwnProperty("name"); // true
person.hasOwnProperty("gender"); // false
Source by www.codegrepper.com #
 
PREVIOUS NEXT
Tagged: #check #key #exists #dictionary #javascript
ADD COMMENT
Topic
Name
8+4 =