There are no items in your cart
Add More
Add More
Item Details | Price |
---|
Sun Jan 1, 2023
Here are a few examples of JavaScript programs that involve looping:
for (let i = 1; i <= 10; i++) { console.log(i); }
let i = 1; while (i <= 10) { console.log(i); i++; }
let numbers = [1, 2, 3, 4, 5]; for (let number of numbers) { console.log(number); }
let numbers = [1, 2, 3, 4, 5]; numbers.forEach(function(number) { console.log(number); });
let numbers = [1, 2, 3, 4, 5]; let squares = numbers.map(function(number) { return number * number; }); console.log(squares);
DCT Academy
Full Stack web development training institute in Bangalore