Last active
August 29, 2015 14:15
-
-
Save cardoni/2fcbdfb982e6e935f7cd to your computer and use it in GitHub Desktop.
es6 let
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
'use strict' | |
for( let x = 0; x < 1; x += 1 ) { | |
for( let x = 0; x < 20; x += 1 ) { | |
console.log( 'inside: ', x ); | |
} | |
console.log( 'outside: ', x ); | |
} |
For loop version, which looks weird because the first loop only has one iteration:
do (i = 0) ->
for i in [0]
do (i = 0) ->
for i in [0..19]
console.log "inside: #{i}"
console.log "outside: #{i}"
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
CS would be: