Debounce function that limits the rate a callback is triggered. Which implementation is better, and why?
I think the solution with the timeout variable is far more clear, and avoids arithmetic operations. However, your implementation has some odd behaviours. That is, using debounce with a high frequency will postpone the callback indefinitely.
const debounce = (func, interval) =&gt; {
    let timeout = null;
    return ()=&gt;{
        if (timeout) return undefined;
        timeout = setTimeout( ()=&gt;timeout=null, interval)
        return func();
    }
}

As an alternative, I propose this. Using this code, the timeout is only set when an actual function call occurs.