Answers for "nesting arrays javascript"

0

nesting arrays javascript

//Sorry for any grammer or syntax mistakes ahead of time ;)

//Make a nested array
let pets = [["cat", "Purasama"], ["dog", "Woofus"]];
//Refer to a nested array
console.log(pets[0]); //Returns "["cat", "Purasama"]"
console.log(pets[1][1]); //Returns "Woofus"
Posted by: Guest on April-03-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language