3 ms·Easy, use a global counter and only run the function when i % x == 0; i++;by xuki 6y agoEasy, use a global counter and only run the function when i % x == 0; i++;