Skip to content

Instantly share code, notes, and snippets.

@jjcall
Created November 8, 2011 15:48
Show Gist options
  • Save jjcall/1348127 to your computer and use it in GitHub Desktop.
Save jjcall/1348127 to your computer and use it in GitHub Desktop.
Codeacademy Gist
function increment(start, timesToIncrement) {
var counter = 0;
while( counter !== timesToIncrement) {
start++
}
return start;
}
// This function should increment the start value by 1
// the number of times specified.
function increment(start, timesToIncrement) {
// Add the appropriate code here. You must update
// the condition in the while loop. You may want to
// create a new variable to keep track of how many
// times you have incrmeneted the variable.
while( ) {
start++;
}
return start;
}
@dsalazar32
Copy link

// This function should increment the start value by 1
// the number of times specified.
function increment(start, timesToIncrement) {
// Add the appropriate code here. You must update
// the condition in the while loop. You may want to
// create a new variable to keep track of how many
// times you have incrmeneted the variable.
var counter = 0;
while(counter < timesToIncrement) {
counter++;
start++;
}
return start;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment