Skip to content

Glossary: Refactoring and Clean Code

Extract function / variable

Also written: extract function, extract variable

Extract function moves lines that do one job into a new named function. Extract variable stores an expression in a named variable.

Where the book teaches it

Related terms

Inline variable / functionPure function