Is there any way to kill a setInterval loop through an Onclick button
问题 So, I got an infinite loop to work in this function using setInterval attached to an onClick. Problem is, I can't stop it using clearInterval in an onClick. I think this is because when I attach a clearInterval to an onClick, it kills a specific interval and not the function altogether. Is there anything I can do to kill all intervals through an onClick? Here's my .js file and the calls I'm making are input type="button" value="generate" onClick="generation(); input type="button" value=