setInterval(function(){}, 200)
this code run the function each 200 miliseconds, how do I do it if I only want the function to be ran 10 times.
Just use a for loop instead, much easier:
Just try this code.
for (counter=0; counter<0; counter++) {}