Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

check property exists

let result = person.hasOwnProperty('firstName');
console.log(result); // true
Code language: JavaScript (javascript)
Source by www.javascripttutorial.net #
 
PREVIOUS NEXT
Tagged: #check #property #exists
ADD COMMENT
Topic
Name
5+6 =