Created
November 7, 2011 00:15
-
-
Save abloom/1343851 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| arr = [1, 2, 3, 4, 5, 6, 7, 8] | |
| break for num in arr when num % 2 == 0 | |
| alert(num) |
Author
they both compile to the same JS.
the weird part is that num is accessible after the loop is complete. side effect of using a for loop.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
how is that better than