M

Mr. Dubey • 52.77K Points
Coach

Q. If we have an object r and want to know if it is a Range object, we can write:

  • (A) r typeof Range
  • (B) r is Range
  • (C) r equals Range
  • (D) r instanceof Range
  • Correct Answer - Option(D)
  • Views: 72
  • Filed under category JavaScript

Explanation by: Mr. Dubey
The r instanceof Range returns true if r inherits from Range.prototype. The instanceof operatory does not actually check whether r was initialized by the Range constructor.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.


Question analytics