Extract Variable

Extract one or more occurrences of an expression into a const.

refactoring (extract)
can impact code execution

To extract a variable, you need to select the full expression that you would like to extract, and then invoke the refactor or extract context menu.

Related Code Actions