Skip to main content

  | मौसम…

411 समाचार
Public archive edition · Attributed source reporting with original dates · AI drafts are excluded

411 REFERENCE · Wikibooks

JavaScript/Reserved words/while

Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.

JavaScript volatile with Reserved words 0 The do keyword The while clause includes a condition that determines when the do loop will end. Examples The code var array = [2, 3, 5, 7, 10, 11], i = 0, result = 1; do { result += array[i++]; if (result%2 == 0) { continue; } else if (result > 20) { break; } else { console.log("result = " + result); } } while (i < array.length) returns the following: result = 3 result = 11 See also do JavaScript volatile with Reserved words 0