Skip to content
engineering workbench.by StudyPort Academy
All glossary terms

GLOSSARY · A WORD, UNPACKED

function

a reusable block of code that performs a task, optionally taking inputs and producing an output.

A little more detail

A function definition describes the work; calling the function starts that work. Parameters name the expected inputs, arguments supply actual values, and return gives a value back to the caller. A function that finishes without returning a value produces undefined. Functions are also values, so you can store one, pass it to another function, or return it for later use.

See it in practice

These lessons pair the idea with examples you can change and run.