how to create a timeout function with js code example Example: js settimeout setTimeout(() => { alert('Hello') }, 1000)