[SOLVED] JavaScript function to check if an object contains given property

15.00 $

Category:
Click Category Button to View Your Next Assignment | Homework

You will receive the following solution file(s) instantly after successful payment:

js file icon checkGivenProperty.js (0.4 KB)
Assignment Instructions Updated Recently? Submit Below and we will provide new Solution!
Submit New Instructions
🔒 Securely Powered by:
Secure Checkout
5/5 - (3 votes)

Write a JavaScript function to check if an object contains given property. Create a function checkGivenProperty() that accepts a object and a property name as arguments and return true or false.

Tip 1: Use hasOwnProperty.call()

Tip 2: First create an object with properties , then use hasOwnProperty.call() to check for a given property.

  • checkGivenProperty.js