Skip to content

Instantly share code, notes, and snippets.

@idoushiki
Last active July 16, 2017 09:14
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 idoushiki/6dbd576faa02a2cdda2d52b17b047ec8 to your computer and use it in GitHub Desktop.
Save idoushiki/6dbd576faa02a2cdda2d52b17b047ec8 to your computer and use it in GitHub Desktop.
<script>
var a=[1,3,5,7];
var b=5;
var i=0;
while(i<4 && b!=a[i]){
i=i+1;
}
if(i<4){
document.write(a[i]);
}
else{
document.write("失敗");
}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment