Skip to content

Category: Questions

Interval id counter keeps growing after clearing old one

Suppose I have the following intervals, the id of the first interval is 1, even that I cleared it the second interval gets id of 2. is there a way the I can reset the interval’s id when it cleared? such that the second interval will have id of 1. Answer …is there a way the I can reset the

Cleaner way instead of running the function every second

I made a simple Coin System with JavaScript. And to make Upgrades, I made a button that gets enabled when it’s over 10. To make this permanently I run this function every millisecond with this: Anyway, is there a cleaner way to run this system without running the function every millisecond? It looks lik…

Mapbox color map except for polygons [closed]

Hello i was wondering if anybody knew if there was a way to add some kinda color to the whole map (I’m using mapbox) expect for the places where there are polygons. So that it works like a …