settimeout typescript w3schools code example Example: timeout typescript setTimeout(() => { console.log('hi'); }, 500);