error first callback in node js

  1. A function that takes a callback as its last parameter should check for an error as the first parameter of that callback
  2. If there is an error, the callback should be called with the error as the first parameter
  3. If there is no error, the callback should be called with null as the first parameter and any subsequent parameters as the second and onward parameters.