From ce2838545bf2b99e48af8efec6231b84b56b44ef Mon Sep 17 00:00:00 2001 From: Natanael Log Date: Sat, 1 Jul 2017 15:10:36 +0200 Subject: [PATCH] doc, util, console: clarify ambiguous docs Add clarification to the documentation on util.format() and console.log() regarding how excessive arguments are treated when the first argument is a non-format string compared to when it is not a string at all. PR-URL: https://github.com/nodejs/node/pull/14027 Fixes: https://github.com/nodejs/node/issues/13908 Reviewed-By: Vse Mozhet Byt Reviewed-By: Luigi Pinca Reviewed-By: Franziska Hinkelmann Reviewed-By: Colin Ihrig --- doc/api/console.md | 4 +--- doc/api/util.md | 11 ++++++----- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/doc/api/console.md b/doc/api/console.md index 5b687140253d26..f3652a56561316 100644 --- a/doc/api/console.md +++ b/doc/api/console.md @@ -227,9 +227,7 @@ console.log('count:', count); // Prints: count: 5, to stdout ``` -If formatting elements (e.g. `%d`) are not found in the first string then -[`util.inspect()`][] is called on each argument and the resulting string -values are concatenated. See [`util.format()`][] for more information. +See [`util.format()`][] for more information. ### console.time(label)