How to change the interval dynamically when using setInterval
问题 I have this fiddle : https://jsfiddle.net/reko91/stfnzoo4/ Im currently using Javascripts setInterval() to log a string to console. What I want to do, is in this setInterval function check whether the interval variable has changed, if it has, change the interval in the setInterval function. I can lower the interval variable by 100 (speeding the function up) by a click a button. Is this possible ? Someone mentioned this : Changing the interval of SetInterval while it's running But this is