Create a function checkgivenproperty that accepts a object


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.

Solution Preview :

Prepared by a verified Expert
Basic Computer Science: Create a function checkgivenproperty that accepts a object
Reference No:- TGS02270653

Now Priced at $20 (50% Discount)

Recommended (91%)

Rated (4.3/5)