Answers for "array in array"

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
12

javascript element in array

var fruits = ["Banana", "Orange", "Apple", "Mango"];

var n = fruits.includes("Mango");
Posted by: Guest on March-02-2020
2

js in_array

var a = [1, 2, 3];
a.includes(2); // true 
a.includes(4); // false
Posted by: Guest on July-28-2020
0

how to create multidimensional array in php

$cars = array
  (
  array("Volvo",22,18),
  array("BMW",15,13),
  array("Saab",5,2),
  array("Land Rover",17,15)
  );
Posted by: Guest on April-30-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language