void

The return type of a function whose result has no meaning and should be ignored.

In more detail

A callback typed as returning void may still return a value; it is simply ignored, which is why forEach accepts functions that return something. A function declared to return undefined, in contrast, must actually return undefined.

Related terms

Taught in

References