Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

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"
Comment

PREVIOUS NEXT
Code Example
Javascript :: remove node from linked list c 
Javascript :: regular expression 
Javascript :: module 
Javascript :: pass a function as a parameter in other function 
Javascript :: react props change 
Javascript :: json object in html page 
Javascript :: button clicker code 
Javascript :: js arrow function 
Javascript :: react navigation header title 
Javascript :: repeat pattern regex 
Javascript :: onkeypress 
Javascript :: jquery basics 
Javascript :: loop foreach async await 
Javascript :: private router react v6 
Javascript :: arrow function javascript rules 
Javascript :: useReducer() hook react 
Javascript :: method function difference 
Javascript :: comming soon page in react 
Javascript :: template literals in js 
Javascript :: react-bootstrap sidebar menu 
Javascript :: update data in sequelize 
Javascript :: how to turn of autocomplete in react hook form material ui 
Javascript :: javascript making a tag game 
Javascript :: how to set three js canvas width 100% 
Javascript :: vue 
Javascript :: use node modules in next.js 
Javascript :: req.header express.js 
Javascript :: Array of indexOf 
Javascript :: Document object not defined Next js 
Javascript :: display none after hover 
ADD CONTENT
Topic
Content
Source link
Name
8+9 =