GoLand 2026.3 Help

Extract Variable dialog

Generally, this dialog is used to extract new variables. Depending on the language, there may be additional options.

Item

Description

Language

Name

Specify the name for the new variable.

All

Replace all occurrences

Select this option to replace all the occurrences of the selected expression (if more than one occurrence of the selected expression is found).

All

Choose how to extract the variable:

  • var: declare a function-scoped variable, or a global variable outside a function.

  • const: declare a block-scoped variable that cannot be reassigned.

  • let: declare a block-scoped variable that can be reassigned.

JavaScript variable declaration

JavaScript

22 September 2026