Skip to content

Instantly share code, notes, and snippets.

@shigemk2
Created February 1, 2015 08:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shigemk2/e66c3e8fe71e238a001e to your computer and use it in GitHub Desktop.
Save shigemk2/e66c3e8fe71e238a001e to your computer and use it in GitHub Desktop.
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