A

Admin • 833K Points
Coach

Q. What is the default value of 'this' in a JavaScript class method?

  • (A) window
  • (B) undefined
  • (C) the class instance
  • (D) null
  • Correct Answer - Option(C)
  • Views: 25
  • Filed under category JavaScript
  • Hashtags:

Explanation by: Admin

In class methods, 'this' refers to the class instance.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.