When running some code in the playground, there is no way to stop the execution of a running program (a la Ctrl+C in the terminal). This can lead to some weird behaviour. For example, set an interval to log A to the console periodically and run the code. Changing the output to B causes A and B to both be output to the console.

Repro:
- Simply run the following line of code in the playground, and run the code.
let interval = setInterval(() => { console.log('A') }, 1000);
- Modify the code, and 'run' again:
let interval = setInterval(() => { console.log('B') }, 1000);
Expected behavior:
I expect only 'B' to be printed.
Actual behavior:
'B' and 'A' are being printed.
When running some code in the playground, there is no way to stop the execution of a running program (a la Ctrl+C in the terminal). This can lead to some weird behaviour. For example, set an interval to log
Ato the console periodically and run the code. Changing the output toBcausesAandBto both be output to the console.Repro:
Expected behavior:
I expect only 'B' to be printed.
Actual behavior:
'B' and 'A' are being printed.