0

For some reason, this has eluded me for a long time, but why do some api documentation list their arguments as such:

peripheral.discoverServices(serviceUUIDs[, callback(error, services)]);

(https://github.com/sandeepmistry/noble)

the arguments seem to be an array but not? What's the reasoning behind writing down an argument like this?

Allen
  • 3,601
  • 10
  • 40
  • 59
  • 5
    Means callback is optional. It's a notational thing for documenting the API. –  Aug 31 '15 at 08:25
  • FWIW, this convention comes from unix man pages for documenting unix commands. For example, `ls` is documented as: `ls [OPTIONS]... [ARGUMENTS]...` – slebetman Aug 31 '15 at 09:48

0 Answers0