javascript for loop
var colors=["red","blue","green"];
for (let i = 0; i < colors.length; i++) {
console.log(colors[i]);
}
javascript for loop
var colors=["red","blue","green"];
for (let i = 0; i < colors.length; i++) {
console.log(colors[i]);
}
javascript for loop
let my_capacity = 15;
for (let my_var = 0; my_var < my_capacity; my_var++)
{
console.log(my_var)
}
loops javascript
/*Loops are great tools when you need your program to run a code block a
certain number of times or until a condition is met, but they need a
terminal condition that ends the looping. Infinite loops are likely to
freeze or crash the browser, and cause general program execution mayhem,
which no one wants.
Infinite loop example(do not call this function!):*/
function loopy() {
while(true) {
console.log("Hello, world!");
}
}
/*Loop example with terminal condition:*/
function myFunc() {
for (let i = 1; i <= 4; i += 2) {
console.log("Still going!");
}
}
javascript.loop
echo "# AashutoshSINHA" >> README.md
git init
git add README.md
git commit -m "first commit"
git branch -M main
git remote add origin https://github.com/AashutoshSINHA/AashutoshSINHA.git
git push -u origin main
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us