local

Declare a function-local variable

low risk

interactive breakdown — edit the command and press Explain
$ 
What it does

Limits a variable to the current function in bash.

Examples
local name="$1"Inside a function · explain & risk-check →
Related
declare set
Open the full explainer →More in Shell & Scripting

Reference text is hand-written and may be incomplete — check man local for your version. Test destructive commands on a non-production system first.