⊗jsPmMuStru 180 of 504 menu

Multidimensional Structures in JavaScript

You can combine multidimensional arrays and objects to create various structures. Let's, for example, create an object containing arrays inside it:

let users = { 'boys': ['boy1', 'boy2', 'boy3'], 'girls': ['girl1', 'girl2', 'girl3'], };

Let's output some element from this object:

console.log(users['boys'][1]); // will output 'boy2'

Given the following object with students:

let students = { 'group1': ['name11', 'name12', 'name13'], 'group2': ['name21', 'name22', 'name23'], 'group3': ['name31', 'name32', 'name33'], };

Display the first student from the third group.

English
AfrikaansAzərbaycanБългарскиবাংলাБеларускаяČeštinaDanskDeutschΕλληνικάEspañolEestiSuomiFrançaisहिन्दीMagyarՀայերենIndonesiaItaliano日本語ქართულიҚазақ한국어КыргызчаLietuviųLatviešuМакедонскиMelayuမြန်မာNederlandsNorskPolskiPortuguêsRomânăРусскийසිංහලSlovenčinaSlovenščinaShqipСрпскиSrpskiSvenskaKiswahiliТоҷикӣไทยTürkmenTürkçeЎзбекOʻzbekTiếng Việt
We use cookies for website operation, analytics, and personalization. Data processing is carried out in accordance with the Privacy Policy.
accept all customize decline