Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit ef74368

Browse filesBrowse files
committed
doc: fix heading of optional console method args
PR-URL: #21311 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent 4f17841 commit ef74368
Copy full SHA for ef74368

File tree

Expand file treeCollapse file tree

1 file changed

+11
-8
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+11
-8
lines changed
Open diff view settings
Collapse file

β€Ždoc/api/console.mdβ€Ž

Copy file name to clipboardExpand all lines: doc/api/console.md
+11-8Lines changed: 11 additions & 8 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ operates similarly to the `clear` shell command. On Windows, `console.clear()`
164164
will clear only the output in the current terminal viewport for the Node.js
165165
binary.
166166

167-
### console.count([label='default'])
167+
### console.count([label])
168168
<!-- YAML
169169
added: v8.3.0
170170
-->
@@ -197,7 +197,7 @@ undefined
197197
>
198198
```
199199

200-
### console.countReset([label='default'])
200+
### console.countReset([label])
201201
<!-- YAML
202202
added: v8.3.0
203203
-->
@@ -381,7 +381,7 @@ console.table([{ a: 1, b: 'Y' }, { a: 'Z', b: 2 }], ['a']);
381381
// β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”˜
382382
```
383383

384-
### console.time(label)
384+
### console.time([label])
385385
<!-- YAML
386386
added: v0.1.104
387387
-->
@@ -392,7 +392,7 @@ are identified by a unique `label`. Use the same `label` when calling
392392
[`console.timeEnd()`][] to stop the timer and output the elapsed time in
393393
milliseconds to `stdout`. Timer durations are accurate to the sub-millisecond.
394394

395-
### console.timeEnd(label)
395+
### console.timeEnd([label])
396396
<!-- YAML
397397
added: v0.1.104
398398
changes:
@@ -453,7 +453,7 @@ The following methods are exposed by the V8 engine in the general API but do
453453
not display anything unless used in conjunction with the [inspector][]
454454
(`--inspect` flag).
455455

456-
### console.markTimeline(label)
456+
### console.markTimeline([label])
457457
<!-- YAML
458458
added: v8.0.0
459459
-->
@@ -476,11 +476,11 @@ the **Profile** panel of the inspector.
476476
```js
477477
console.profile('MyLabel');
478478
// Some code
479-
console.profileEnd();
479+
console.profileEnd('MyLabel');
480480
// Adds the profile 'MyLabel' to the Profiles panel of the inspector.
481481
```
482482

483-
### console.profileEnd()
483+
### console.profileEnd([label])
484484
<!-- YAML
485485
added: v8.0.0
486486
-->
@@ -490,6 +490,9 @@ current JavaScript CPU profiling session if one has been started and prints
490490
the report to the **Profiles** panel of the inspector. See
491491
[`console.profile()`][] for an example.
492492

493+
If this method is called without a label, the most recently started profile is
494+
stopped.
495+
493496
### console.timeStamp([label])
494497
<!-- YAML
495498
added: v8.0.0
@@ -523,7 +526,7 @@ This method does not display anything unless used in the inspector. The
523526
[`console.group()`]: #console_console_group_label
524527
[`console.log()`]: #console_console_log_data_args
525528
[`console.profile()`]: #console_console_profile_label
526-
[`console.profileEnd()`]: #console_console_profileend
529+
[`console.profileEnd()`]: #console_console_profileend_label
527530
[`console.time()`]: #console_console_time_label
528531
[`console.timeEnd()`]: #console_console_timeend_label
529532
[`console.timeStamp()`]: #console_console_timestamp_label

0 commit comments

Comments
0Β (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.