Skip to content

Instantly share code, notes, and snippets.

@tarunama
Created January 11, 2015 05:51
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 tarunama/587e32b339f70a1ecc21 to your computer and use it in GitHub Desktop.
Save tarunama/587e32b339f70a1ecc21 to your computer and use it in GitHub Desktop.
[JavaScript] exit()的なことがしたい時 ref: http://qiita.com/tarunama/items/0b2eb347f3f92f4c5e3a
for (var i=0; i < 10; i++)
{
console.log(hoge);
// returnで無理矢理処理を終わらせる
return;
// ここら辺でエラーでる
if (hoge < 10) return true;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment