Jun-30-2017, 04:11 PM
You can access it if you pass it. Or if you keep the variable in an enclosing scope that the function can reach into (like a class).
What do you consider to "scale well"? You're not consuming excess memory since it's just one variable regardless of however much you call that function.
What do you consider to "scale well"? You're not consuming excess memory since it's just one variable regardless of however much you call that function.