node.js - Callback on success: Should err be null or undefined -
function myasyncfn( params, callback ) { var result; /* something... ...with success! */ callback( null, result ); // this? // callback( undefined, result ); or this? }
i wonderÃng expected value of err
in callback on success. null
or undefined
?
node.js
No comments:
Post a Comment