Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.