Extract Variable

Extract code to a variable

The Extract Variable refactoring wraps a selected expression into a variable. Select an expression and press ⌥⌘V (macOS) / Ctrl+Alt+V (Windows/Linux).


Related Resources

Close Tabs
Close Tabs
Close inactive tabs so you an focus on your current working context.
Refactoring
Refactoring
Refactoring code for understanding.
Extract Method
Extract Method
Extract code to a new method.