Created
May 5, 2011 21:26
-
-
Save aseemk/957996 to your computer and use it in GitHub Desktop.
Streamline v0.1.21 chokes on variables assigned inside a for-in loop that are defined outside.
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 obj, key, val; | |
obj = { | |
foo: 'bar', | |
hello: 'world' | |
}; | |
for (key in obj) { | |
val = obj[key]; | |
setTimeout(_, 1000); | |
console.log('obj[' + key + '] = ' + val); | |
} |
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 obj, val; | |
obj = { | |
foo: 'bar', | |
hello: 'world' | |
}; | |
for (var key in obj) { | |
val = obj[key]; | |
setTimeout(_, 1000); | |
console.log('obj[' + key + '] = ' + val); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment