One of the best way to check property of an Object in JavaScript

I always wonder which is the best way to check property of any Object in Javascript. Here is the example

Example 1

Example 2

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.