javascript setTimeout being evaluated and messing with the variables in the background? -
code:
oncallofthisfunc() { settimeout(() => { if(myvar.length===0) { this.error() } },3000) }
but problem when other function executed, assume success, this.error being run in background , refer updated var it'll return error. , it's rerun new vars(which not error) settimeout before return error, want stop executing in background?
Comments
Post a Comment