To use sprintf with Node.js, we use the util.format
method.
For instance, we write
const s = util.format("hello %s", "world");
to call util.format
to return a formatted string with %s
filled in with the arguments after the first.
Therefore, s
is 'hello world'
.