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>
This commit is contained in:
Leko authored and Myles Borins committed 2018-02-27 01:10:54 -05:00
1 parent 74d86ccd12
commit d554b8a669
1 file changed
+2
+2
View File
@@ -337,6 +337,8 @@ argument in callbacks.
```js
const assert = require('assert');
assert.ifError(null);
// OK
assert.ifError(0);
// OK
assert.ifError(1);