diff --git a/doc/api/console.md b/doc/api/console.md index 5ef55e63da27c6..06f89cf22204b0 100644 --- a/doc/api/console.md +++ b/doc/api/console.md @@ -164,7 +164,7 @@ operates similarly to the `clear` shell command. On Windows, `console.clear()` will clear only the output in the current terminal viewport for the Node.js binary. -### console.count([label='default']) +### console.count([label]) @@ -197,7 +197,7 @@ undefined > ``` -### console.countReset([label='default']) +### console.countReset([label]) @@ -381,7 +381,7 @@ console.table([{ a: 1, b: 'Y' }, { a: 'Z', b: 2 }], ['a']); // └─────────┴─────┘ ``` -### console.time(label) +### console.time([label]) @@ -392,7 +392,7 @@ are identified by a unique `label`. Use the same `label` when calling [`console.timeEnd()`][] to stop the timer and output the elapsed time in milliseconds to `stdout`. Timer durations are accurate to the sub-millisecond. -### console.timeEnd(label) +### console.timeEnd([label]) @@ -476,11 +476,11 @@ the **Profile** panel of the inspector. ```js console.profile('MyLabel'); // Some code -console.profileEnd(); +console.profileEnd('MyLabel'); // Adds the profile 'MyLabel' to the Profiles panel of the inspector. ``` -### console.profileEnd() +### console.profileEnd([label]) @@ -490,6 +490,9 @@ current JavaScript CPU profiling session if one has been started and prints the report to the **Profiles** panel of the inspector. See [`console.profile()`][] for an example. +If this method is called without a label, the most recently started profile is +stopped. + ### console.timeStamp([label])