Find an Online Tutor Now

Asked • 01/01/20

How to check if an Object has a Property

Suppose we have the following javascript object:

var usersList = {
  Bob: {
    age27,
    onlinetrue
  },
  Katie: {
    age48,
    onlinetrue
  },
  Chris: {
    age19,
    onlinetrue
  }
};


How can we find if a specific property exists in the above object. e.g does Bob exists in the above object ?

1 Expert Answer

By:

Asad I. answered • 01/01/20

Tutor
New to Wyzant

Experienced Javascript, php, html and React Native Tutor.

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.