Answers for "javascript arr[o]"

140

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
2

how to create an array in javascript

let myVar = ["1","2","3"];
Posted by: Guest on December-04-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language