17 lines
231 B
Markdown
17 lines
231 B
Markdown
|
|
|
|
```js
|
|
//+ run
|
|
function printNumbersInterval() {
|
|
var i = 1;
|
|
var timerId = setInterval(function() {
|
|
console.log(i);
|
|
if (i == 20) clearInterval(timerId);
|
|
i++;
|
|
}, 100);
|
|
}
|
|
|
|
// вызов
|
|
printNumbersInterval();
|
|
```
|
|
|