setInterval started, can't stop with clearInterval

I have a project, kucoinbtcprice, that I’ve set to query data from an API every 10 seconds, using setInterval. I coded it this way for testing, and it seems to be running on the 10-second interval constantly. I’ve tried using clearInterval to stop it, but to no avail. Is there a command that I can use in the terminal, or some code that I can use, that would kill it? Or some way to find the ID to use in the clearInterval function?


Kevin G

hi @kevingallagher34 - did you assign the setInterval call to a variable? if not, you should do that - it returns the id that you can then pass into clearInterval

Hi @jenn , yes I did that, but it doesn’t seem to stop. Thanks