Skip to content

Commit 1e16b38

Browse files
vsemozhetbytBethGriggs
authored andcommitted
doc: mark optional parameters in timers.md
PR-URL: #35764 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
1 parent b74f093 commit 1e16b38

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

doc/api/timers.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -188,14 +188,14 @@ async function timerExample() {
188188
timerExample();
189189
```
190190

191-
### `setInterval(callback, delay[, ...args])`
191+
### `setInterval(callback[, delay[, ...args]])`
192192
<!-- YAML
193193
added: v0.0.1
194194
-->
195195

196196
* `callback` {Function} The function to call when the timer elapses.
197197
* `delay` {number} The number of milliseconds to wait before calling the
198-
`callback`.
198+
`callback`. **Default**: `1`.
199199
* `...args` {any} Optional arguments to pass when the `callback` is called.
200200
* Returns: {Timeout} for use with [`clearInterval()`][]
201201

@@ -206,14 +206,14 @@ set to `1`. Non-integer delays are truncated to an integer.
206206

207207
If `callback` is not a function, a [`TypeError`][] will be thrown.
208208

209-
### `setTimeout(callback, delay[, ...args])`
209+
### `setTimeout(callback[, delay[, ...args]])`
210210
<!-- YAML
211211
added: v0.0.1
212212
-->
213213

214214
* `callback` {Function} The function to call when the timer elapses.
215215
* `delay` {number} The number of milliseconds to wait before calling the
216-
`callback`.
216+
`callback`. **Default**: `1`.
217217
* `...args` {any} Optional arguments to pass when the `callback` is called.
218218
* Returns: {Timeout} for use with [`clearTimeout()`][]
219219

0 commit comments

Comments
 (0)