A Pen by Robert Gorman on CodePen.
Created
January 1, 2017 21:47
-
-
Save rgaz1962/531dd9e835a366a089d3c2351f4e710a to your computer and use it in GitHub Desktop.
XNqPzr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var sum = 0; | |
var number = 1; | |
while (number <= 50) { // -- condition | |
sum += number; // -- body | |
number++; // -- updater | |
} | |
alert("Sum = " + sum); // => Sum = 1275 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment