prefer get element by id, because is more faster than search by className (because using id you will return the first element with id, when code return the element, break the search; And searching by className you will return more than one element, that's very slow)
i prefer that
```js
const elementId = "clicker";
const button = document.getElementById(elementId);
const taskId = setInterval(() => button.click(), 0);
const cancelAutoClick = () => clearInterval(taskId);
```
Frontend Development
JavaScript Auto-Clicker(s)
Submitted by Yondu, 12-02-2021, 10:25 PM, Thread ID: 197769
Thread Closed
RE: JavaScript Auto-Clicker(s) 30-08-2021, 05:26 AM #7
30-08-2021, 05:26 AM
#7