πŸ“Š JavaScript
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
πŸ’¬ Discuss
βœ… Correct Answer: (A) 1

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

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

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
120
Total Visits
πŸ“½οΈ
2 y ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
85%
Success Rate