Execute script only one time after defined milliseconds
let InternalNumber=window.setTimeout(function,timer in milliseconds)
Note: The system execute the event system only every 1 second. If you define 500, the system execute this after 1 second and not 500 ms.
you can clear this timer with
window.clearTimeout(internalNumber);
Example:
Close this window ALWAYS after 1 minute
let ll_timeout=window.setTimeout(()=>window.close();,60000);
Delete the timer
window.clearTimeout(ll_timeout);