What return does is sending me to the beginning of the function. However it is useless for me. I am running the function every 30 seconds with an Interval. So it keeps running where I need it to run every 30 seconds for once.
And as far as I know break isn't helping either, it is breaking the loop but still processing the rest of codes.
So is there a function or code where it kills function totally until I recall it?
Thanks for your time!
Edit: After requets.
Edit 2: To be clear, stopping an Interval isn't what I need.
So here is an example of mine. What I need on this code is checking for error every 15 second. But what does this code is checking error and if it gets error it is checking again.
        setInterval(checkError, 15000);
        
        function checkError() {
    if (err) {
                    console.log(err);
                    return;
                }
        } 
    