console.log('Start'); setTimeout(() => { console.log('This runs after ~2 seconds'); }, 2000); console.log('End'); // logs immediately, before the timeout callback
Click Run to execute this code.