Is it possible in javascript to create an automatic clicker in ms? [duplicate]

I wrote like this but it works straight and does not stop In a function I put inside a website

    setInterval(() => {
    document.getElementById("<id on what to click>").click();
},0);