We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2ed6e0f commit b588049Copy full SHA for b588049
timing-events/setTimeOut/example.js
@@ -0,0 +1,9 @@
1
+function timer(x, y, duration) {
2
+ for (let i = x; i <= y; i++) {
3
+ setTimeout(() => {
4
+ console.log(i);
5
+ }, duration * i);
6
+ }
7
+}
8
+timer(1, 5, 500);
9
+timer(10, 20, 1500);
0 commit comments