Answers for "array javscript"

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
1

Array

// this is sumple array
let array=[1,2,3,4]
Posted by: Guest on September-10-2021
4

javascript array

const arr = [1, 2, 3];
Posted by: Guest on October-04-2020
1

javascript array

//An array is a list of thing, you can add as many things as you want

var food = ["cake", "apple", "Ice-Cream"]

//You can use Math.Random to pick a random number
//from one to the length of the array

var Number = [Math.floor(Math.random() * food.length)];
//then we can console.log the random word from the array
console.log(logammounts[woodloot])
Posted by: Guest on February-27-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language