javascript document documentation code example
Example 1: js doc
/**
* This is a function.
*
* @param {string} n - A string param
* @return {string} A good string
*
* @example
*
* foo('hello')
*/
function foo(n) {
return n
}
Example 2: javascript document
var name = document.getElementById('name').value ;
alert('hello, '+name);