diff --git a/doc/api/util.md b/doc/api/util.md index af75ecb9f62cc6..525b567abebe7e 100644 --- a/doc/api/util.md +++ b/doc/api/util.md @@ -777,8 +777,14 @@ const million = 1_000_000; const bigNumber = 123_456_789n; const bigDecimal = 1_234.123_45; -console.log(thousand, million, bigNumber, bigDecimal); -// 1_000 1_000_000 123_456_789n 1_234.123_45 +console.log(inspect(thousand, { numericSeparator: true })); +// 1_000 +console.log(inspect(million, { numericSeparator: true })); +// 1_000_000 +console.log(inspect(bigNumber, { numericSeparator: true })); +// 123_456_789n +console.log(inspect(bigDecimal, { numericSeparator: true })); +// 1_234.123_45 ``` `util.inspect()` is a synchronous method intended for debugging. Its maximum