const debonce=function(func,timeout){
let time;
return ()=>{
if(time){
clearTimeout(time)
}
time=setTimeout(function(){
func();
},timeout)
}
}
const debonce=function(func,timeout){
let time;
return ()=>{
if(time){
clearTimeout(time)
}
time=setTimeout(function(){
func();
},timeout)
}
}