A technique mentioned by Marijn Haverbeke and used in Tern
Created
April 18, 2013 15:44
-
-
Save tmcw/5413779 to your computer and use it in GitHub Desktop.
Demonstrating latebinding
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 x; | |
function latebinder() { | |
x = 2; | |
try { return x; } | |
finally { x = 4; } | |
} | |
latebinder(); | |
x; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment