Vidyalelo
JavaScript · Q27

Array And Function

Programming · JavaScript · question 27

Q27

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
Answer
B.
0
C.
Null
D.
Undefined

Answer: Option A

Solution

Answer: Option A
Solution:
The state stored in d is 1 because d was not reset.