A

Admin • 828.03K Points
Coach

Q. Consider the following code snippet :
var c = counter(), d = counter();
c.count()
d.count()
c.reset()
c.count()
d.count()
The state stored in d is :

  • (A) 1
  • (B) 0
  • (C) Null
  • (D) Undefined
  • Correct Answer - Option(A)
  • Views: 14
  • Filed under category JavaScript
  • Hashtags:

Explanation by: Admin
The state stored in d is 1 because d was not reset.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.