I'm doing this fun coding challenge that I found at a meetup (doyouevendev.org)
What is the fastest way to generate a million clicks on an element? The coding challenge seems to be centred around the inspector, which I'm finding worthwhile.
My code (that i'm executing in chrome command line):
var item = document.getElementsByClassName("clicky-button pulse");
var item = item[0];
count = 0;
(function clickIt() {
count += 1
setInterval(function changeClicks() {
item.click();
}, 1);
if (count <= 50) {
clickIt();
};
})();
I suspect there's a better way... It actually seems to be slowing down...