Friday 15 July 2011

node.js - Callback on success: Should err be null or undefined -



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