Answers for "[...arr] javascript"

141

javascript array

//create an array like so:
var colors = ["red","blue","green"];

//you can loop through an array like this:
for (var i = 0; i < colors.length; i++) {
    console.log(colors[i]);
}
Posted by: Guest on July-01-2019
-3

javascript array

window.location.href
Posted by: Guest on December-12-2020
0

java script arrays

fruits = ["Banana", "Orange", "Apple", "Mango"];
text = "<ul>";
for (i = 0; i < fruits.length; i++) {
  text += "<li>" + fruits[i] + "</li>";
}
Posted by: Guest on March-01-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language