Q. How do you check if an object has a specific property?

  • (A) hasOwnProperty()
  • (B) contains()
  • (C) includes()
  • (D) exists()
πŸ’¬ Discuss
βœ… Correct Answer: (A) hasOwnProperty()
Explanation: hasOwnProperty() checks if a property is defined on the object.
Explanation by: Mr. Dubey
hasOwnProperty() checks if a property is defined on the object.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
87
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
92%
Success Rate