To document Javascript, I recommend the use of the pad described in Jsdoc, whose page with explanatory documentation is http://usejsdoc.org/. In addition to telling in detail a pattern 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 its documented file so that your IDE displays context documentations. That way you’ll need to see much less Google for something that’s already explained during use.