Skip to content

Instantly share code, notes, and snippets.

@guiomie
Created January 5, 2014 04:45
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 guiomie/8264440 to your computer and use it in GitHub Desktop.
Save guiomie/8264440 to your computer and use it in GitHub Desktop.
Robbies loop test
function IsSubstractionZero(x, y){
var substraction = y - x;
if(substraction === 0){
return false;
}
return true;
}
var x = 0;
var y = 6;
while(IsSubstractionZero(x, y)){
console.log("x=" + x + " y=" + y)
x++;
y--;
if(x === 10)
break;
}
console.log("Out of loop");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment