// JSDoc on a symbol renders as documentation inside its hover popup.
/**
* Adds two numbers together.
* @param a the first addend
* @param b the second addend
* @returns their sum
*/
function function add(a: number, b: number): numberAdds two numbers together.
add((parameter) a: numberthe first addend
a: number, (parameter) b: numberthe second addend
b: number) {
return (parameter) a: numberthe first addend
a + (parameter) b: numberthe second addend
b
}
const total = function add(a: number, b: number): numberAdds two numbers together.
add(1, 2)