Created
May 12, 2023 15:26
-
-
Save suhailgupta03/29558e388b7de686b8f4eaf97533dc94 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 x = 2; // Initialization | |
while(x <= 100) { // Condition | |
if(x % 2 == 0) { // % gives the remainder | |
// this means that the number | |
// is EVEN | |
console.log(x); | |
} | |
x = x + 1; // Updating the state | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment