Skip to content

Instantly share code, notes, and snippets.

@hao-ji-xing
Created January 13, 2014 06:41
Show Gist options
  • Save hao-ji-xing/8395669 to your computer and use it in GitHub Desktop.
Save hao-ji-xing/8395669 to your computer and use it in GitHub Desktop.
一种中断分支的写法
function fn(){
var ret = 0;
do{
if(xxx){
ret = 1;
break;
}
if(ooo){
ret = 2;
break;
}
}while(false);
return ret;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment