Skip to content

Instantly share code, notes, and snippets.

@rbezerra
Created June 26, 2014 03:20
Show Gist options
  • Select an option

  • Save rbezerra/e9ab9bd180e81f1b603b to your computer and use it in GitHub Desktop.

Select an option

Save rbezerra/e9ab9bd180e81f1b603b to your computer and use it in GitHub Desktop.
questao_trt
var vetor=[6, 5, 1, 9, 0, 1, 4, 2, 3, 7],
i,k,a;
k=1;
i=0;
a=false;
while(i<=10 && a==false){
if(vetor[i]==k){
console.log("Sucesso");
a = true;
}else{
console.log("Insucesso");
}
i=i+1;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment