TypeOf-3

 

TypeOf will return undefined and will print true as comparing to undefined will return true.

 
 
 
<!DOCTYPE html> <html> <head> <title>Welcome to LearnKode - A code learning platform</title> </head> <body> <script> var obj = {}; var result = (typeof obj.propNotDeclared === 'undefined'); document.write(result); </script> </body> </html>
Output