timeout: any = null; onKeySearch(event: any) { clearTimeout(this.timeout); this.timeout = setTimeout( () => { let number = event.target.value; if (number.length > 3) // here is chech length using variableName.length { console.log(number); } }, 1000); }