Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

check property exists

let person = {
   firstName: 'John',
   lastName: 'Doe',
   age: undefined
};

let result = person.age !== undefined;
console.log(result); // false
Code language: JavaScript (javascript)
Source by www.javascripttutorial.net #
 
PREVIOUS NEXT
Tagged: #check #property #exists
ADD COMMENT
Topic
Name
3+6 =