Loading problem…
This problem builds on setinterval-ii. Complete that first, then load your solution to continue.
Add two practical features to your custom interval utility.
Implement:
Where options supports:
leading (boolean): run once immediately before scheduling interval ticksmaxRuns (number): auto-stop after N total runsAlso:
customClearInterval should stop future runs0setTimeout internally (do not use native setInterval)