doc: Add example of null to assert.ifError

PR-URL: https://github.com/nodejs/node/pull/18236
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
pull/18209/merge
Leko 2018-01-19 01:20:18 +09:00 committed by Ruben Bridgewater
parent 143b235274
commit 08ada72cc6
No known key found for this signature in database
GPG Key ID: F07496B3EB3C1762
1 changed files with 2 additions and 0 deletions

View File

@ -442,6 +442,8 @@ argument in callbacks.
```js
const assert = require('assert').strict;
assert.ifError(null);
// OK
assert.ifError(0);
// OK
assert.ifError(1);