Does JavaScript have a standard for commenting functions?

JavascriptWeb DevelopmentFront End Technology

For commenting functions, you can use the following jsdoc style documentation,

/**
   * Adds two numbers
   * @param {Number} a
   * @param {Number} b
   * @return {Number} sum
*/

function sum(a,b) {
   return a + b;
}
raja
Published on 23-Feb-2018 10:13:46
Advertisements