# Extract Variable dialog

> For the complete documentation index, see [llms.txt](https://www.jetbrains.com/help/go/2026.3/llms.txt).

> **TL;DR**
> `Refactor | Introduce Variable`
>
>
>
> `Ctrl+Alt+V` (Windows), `⌘ ⌥ V` (macOS), `⌘ ⌥ V` (IntelliJ IDEA Classic (macOS)), `⌘ ⌥ V` (macOS System Shortcuts), `Ctrl+Alt+V` (XWin), `Ctrl+Alt+V` (GNOME), `Alt+Shift+V` (KDE), `Ctrl+Alt+V` (Emacs), `Ctrl+Alt+V` (Sublime Text), `Ctrl+Alt+V` (Sublime Text (macOS)), `Ctrl+Alt+V` (VSCode), `⌘ ⌥ V` (VSCode (macOS))
>
>
>
> The how to section: [Extract/Introduce variable](extract-variable.html)

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](https://resources.jetbrains.com/help/img/idea/2026.3/js_variable_declaration.png)  | JavaScript |

## See also

### Procedures

### External Links

[https://blog.jetbrains.com/go/2018/10/26/refactorings-in-goland-extract-and-inline/](https://blog.jetbrains.com/go/2018/10/26/refactorings-in-goland-extract-and-inline/)

