Jim Priest
11/02/2022, 1:22 PMCharles Robertson
11/02/2022, 1:51 PM<http://variables.blog|variables.blog>
open to read/writes from every possible request.
To be honest, I always thought that singletons should be read only? But that is a whole new debate.
Anyway, I will remove the variables
scope [private component scope] and opt for the private function scope [var]
For backward compatibility, I use:
function foo() {
var local = {};
}
Jim Priest
11/02/2022, 2:20 PMwebsolete
11/02/2022, 2:27 PMcfvonner
11/02/2022, 3:06 PMvar local={}
actually results in a local variable called local
, which if explicitly scoped when used would really be local.local
.