0 votes
in JavaScript by

Which one of the following is the correct output for the given JavaScript code?

const object1 ={  

  property1:20  

};  

console.log(Object.is(object1));  

a) False

b) true

c) 20

d) error

1 Answer

0 votes
by

Answer: A

Reason: In JavaScript, the "Object.is() method is one of the built-in methods. This method is used to know whether two values are the same or not. There is also a specific pre-defined method that compares the values and it returns a Boolean value as the result, which indicates whether two arguments are the same or not.

Related questions

+1 vote
asked Mar 22, 2021 in JavaScript by Robindeniel
0 votes
asked Mar 22, 2021 in JavaScript by Robindeniel
...