-SetTimeOut , SetInterval

-SetTimeOut , SetInterval

setTimeOut – it call to function and execute our codes after a few menutes.

Additionally setTimeOut accepts these values

How it works ?
setTimeOut(()=>{console.log(“Hello khusi”)}, 8000);

and result showed after 8 secound.

.
We can type the third value as so.

setTimeout((text)=>{console.log(“Hello khusi”+ text)}, 8000, “program”);

and it demonstrate

setInterval – it works during the time that we add.