I am slightly confused by the eversame description of newScratch
as “locally scoped”. What exactly counts as locally scoped? I know that it means, that this variable (scratch) is available only within that “location”, but what can define such a border or local restriction?
- is it local in a partial (I guess yes)
- is it local in a range (in sense of not available outside of the range?)
- is it “hyper local” in a range (in sense of available only inside of each single run of that range to that exactly run? meaning I range through
slice(1,2,4)
and inside of that range the 1-range has it’s own defined scratch which is not available in the 2-range?) - is it local inside of if/else “loops”?
- is it local inside of shortcodes? (it is, just adding that)
- any more places that can create local scopes?
I need a dummy explanation The only way I know scopes is from PHP where “local” is inside of methods and functions.