javascript official 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: js
JavaScript (JS) is a lightweight, interpreted, or just-in-time compiled
programming language with first-class functions.
While it is most well-known as the scripting language for Web pages,
many non-browser environments also use it, such as Node.js, Apache
CouchDB and Adobe Acrobat.