Create a version of SetInterval with SetTimeout
Anonymous
let timer = function(fn, delay) => { let context = this; let args = arguments; clearTimeout(timer) timer = setTimeout(fn.call(context, args), delay); };
Check out your Company Bowl for anonymous work chats.