JavaScript/Reserved words/if
< JavaScript | Reserved words
This is an old revision of this page, as edited by Sae1962 (discuss | contribs) at 08:59, 24 May 2016. It may differ significantly from the current revision. |
Previous: goto | Reserved words | Next: implements |
The if keyword stars a loop that executes until the condition is met.
var result = 1;
if (result%2 == 0) {
console.log(result + " is an odd number");
} else {
console.log("result + " is an even number");
}
1 is an even number
Previous: goto | Reserved words | Next: implements |