Tuesday 2 October 2018

console.countReset([label]): Reset the counter for this label

console.countReset([label])
This method resets the counter for this label.

HelloWorld.js
var welcome = "Good Morning"

console.count(welcome);
console.count(welcome);
console.count(welcome);
console.count(welcome);

console.log("Resetting the counter");
console.countReset(welcome);

console.count(welcome);

Output
Good Morning: 1
Good Morning: 2
Good Morning: 3
Good Morning: 4
Resetting the counter
Good Morning: 1



Previous                                                 Next                                                 Home

No comments:

Post a Comment