Created
February 1, 2015 08:01
-
-
Save shigemk2/e66c3e8fe71e238a001e 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
console.log(function () { | |
var ret = []; | |
for (var a of [2,3,4]) { // 値がある | |
ret.push(a * 2); // 処理される | |
} | |
return ret; | |
}()); | |
console.log(function () { | |
var ret = []; | |
for (var a of [1]) { // 値がある | |
for (var b of []) { // 値がない(ソースが空) | |
ret.push(a * b); // 処理されない | |
} | |
} | |
return ret; | |
}()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment