Gistlib Logo

gistlib

create a loop with a while condition in javascript

index.tsx
let i = 0;
while (i < 5) {
  console.log(i);
  i++;
}
54 chars
6 lines

similar javascript code snippets

print the numbers from 1 to 100 in javascript
loop array in javascript
build a list of the numbers from 1 to 100 in javascript
print the numbers from 1 to 100, but only print the even numbers in javascript
reset a loop in javascript
print the numbers from 1 to 100, but only print the even numbers. use a while loop in javascript
find pivot point in javascript
how to get the cartesian product of two sets in javascript
search array until value is found in javascript
how to create an array of size n with numbers filled from 1 to n in javascript

related categories

javascript
loops

gistlibby LogSnag