create a loop from 10 to 13 in javascript

You can use the for loop to create a loop from 10 to 13 in JavaScript.

index.tsx
for (let i = 10; i <= 13; i++) {
  console.log(i);
}
53 chars
4 lines

This loop will start at 10 and run until i is no longer less than or equal to 13. On each iteration, it will log the value of i to the console.

related categories

gistlibby LogSnag