Consider following snippet:
 var myObj = { name: "alex", }; console.log( myObj.hasOwnProperty('name') ); 
What will be printed to the console?
Explanation
Method hasOwnProperty return a boolean showing whether the object has the specified property.

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback
Keep exploring
JavaScript quizzes
Cosmo
Sign Up Now
or Subscribe for future quizzes