What's the point of initializing a variable with the same value twice?
- by JoeM05
I was reading Ben Cherry's "JavaScript Module Pattern: In-Depth", and he had some example code that I didn't quite understand. Under the Cross-File Private State heading, there is some example code that has the following:
var _private = my._private = my._private || {}
This doesn't seem to be different from writing something like this:
var _private = my._private || {}
What's happening here and how are these two declarations different?