To document Javascript, I recommend using the standard described in JSDoc, whose page with explanatory documentation is link . In addition to stating in detail a standard that IDEs like Netbeans and Eclipse understand, JSDoc also has a command-line tool that reads your code and converts it into a ready-to-use HTML manual.
As a quick example, look at the code below
/**
* Esta é uma função de exemplo de uso de JSDoc
*
* @example
* exemplo(3, 5); // 8
*
* @param {Number} obrigatorio Parametro obrigatório
* @param {Number} [opcional] Parametro ocional. Note os '[ ]'
* @returns {Number}
*/
function exemplo (obrigatorio, opcional) {
var resultado = 0;
resultado = obrigatorio + (opcional || 0);
return resultado;
}
For Netbeans IDE 7.4, using the function will generate the following
In the case of Netbeans and other IDEs, see how to add your favorite library, for example jQuery, to a path where there is a documented file so that your IDE displays context documentation. That way you'll need to see Google less often for something that is already explained during use.