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

GLOSSARY · A WORD, UNPACKED

method

a function that belongs to an object, called using dot notation.

A little more detail

Dot notation is the familiar form, such as counter.increment(); bracket notation can also call a method. For a regular function, the object in that call supplies this. Merely taking the function out of the object and calling it separately does not preserve its receiver. An arrow function keeps its surrounding this instead of receiving a new one from the dot.

See it in practice

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