Joined November 2012
·

Christian Bundy

Madison Ave Collective
·
Chicago, IL
·
·
·

Thanks @steve-jansen!

Instead of adding an argument for the callback function, wouldn't it make more sense to return the value in a try...catch block? For example:

try {
  console.log(zlib.gzip('Hello, world!'));
} catch (e) {
  throw e;
}

You're completely right, I'm a UI dev and I've only ever used Javascript in the browser – it just seems like adding callback arguments to NodeJS methods adds cruft to methods that could easily be implemented with native functionality. Thanks for taking the time to help me understand!

Achievements
323 Karma
61,459 Total ProTip Views