Skip to content

Commit 9750e65

Browse files
committed
Update solution.md
add add timerId.
1 parent 8d2b337 commit 9750e65

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

  • 2-ui/1-document/11-modifying-document/10-clock-setinterval

2-ui/1-document/11-modifying-document/10-clock-setinterval/solution.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,11 @@ function update() {
4141
Функция `clockStart` для запуска часов:
4242

4343
```js
44+
45+
var timerId;
46+
4447
function clockStart() { // запустить часы
45-
setInterval(update, 1000);
48+
timerId = setInterval(update, 1000);
4649
update(); // (*)
4750
}
4851

0 commit comments

Comments
 (0)