Created
June 1, 2014 19:27
-
-
Save vird/0932cd197f912a6c6485 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var adapter; | |
adapter = {}; | |
adapter.destroy = function() { | |
var _i, _len, _ref, adapter; | |
_ref = [1, 2, 3]; | |
for (_i = 0, _len = _ref.length; _i < _len; _i++) { | |
adapter = _ref[_i]; | |
adapter = null; | |
} | |
}; | |
adapter.destroy(); | |
console.log(adapter); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
adapter={} | |
adapter.destroy = ()-> | |
for adapter in [1,2,3] | |
adapter = null # this will destroy variable not in scope | |
return | |
adapter.destroy() | |
console.log adapter |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var adapter; | |
adapter = {}; | |
adapter.destroy = function() { | |
var _i, _len, _ref; | |
_ref = [1, 2, 3]; | |
for (_i = 0, _len = _ref.length; _i < _len; _i++) { | |
adapter = _ref[_i]; | |
adapter = null; | |
} | |
}; | |
adapter.destroy(); | |
console.log(adapter); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment