Browse Source

doc: fix template string

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>
v4.x
Rafael Cepeda 9 years ago
committed by Myles Borins
parent
commit
9d1f102801
  1. 3
      doc/api/crypto.markdown

3
doc/api/crypto.markdown

@ -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')}`);
});
```

Loading…
Cancel
Save