doc: fix template string
authorRafael Cepeda <rcepeda1993@gmail.com>
Mon, 15 Feb 2016 15:49:00 +0000 (09:49 -0600)
committerMyles Borins <mborins@us.ibm.com>
Wed, 2 Mar 2016 22:01:11 +0000 (14:01 -0800)
Template string was syntactically incorrect. Copied Documentation code
would throw an error.

PR-URL: https://github.com/nodejs/node/pull/5240
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
doc/api/crypto.markdown

index 8726ed8..2f9a84e 100644 (file)
@@ -1230,8 +1230,7 @@ If an error occurs, `err` will be an Error object; otherwise it is null. The
 const crypto = require('crypto');
 crypto.randomBytes(256, (err, buf) => {
   if (err) throw err;
-  console.log(
-    `${buf.length}` bytes of random data: ${buf.toString('hex')});
+  console.log(`${buf.length} bytes of random data: ${buf.toString('hex')}`);
 });
 ```