Created
January 13, 2014 06:41
-
-
Save hao-ji-xing/8395669 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
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