Function
A reusable operation with defined inputs and a result or effect.
Parameters are names in the definition; arguments are values supplied by a caller. A return value can be used by another computation. A printed message is an output effect and does not replace a returned value. Small functions with explicit inputs are easier to test.
function add(a, b) { return a + b; }Continue with the javascript course →Learn for free. Practice for real. Build your future.Search lessons

