JavaScript closures and methods
In the following case:
var o1 = {}
var o2 = {}
o1.a = function a() {}
o2.b = function b() {
o1.a()
}
Does it close o2.b
" o1
or just a function reference o1.a
?
I doubt this has a big performance or memory impact, especially considering that we do this with the global scope all the time, but I'm just curious.
+3
source to share