Posted On April 4, 2019

Basic JavaScript: Access Multi-Dimensional Arrays With Indexes

kimconnect 0 comments
blog.KimConnect.com >> Codes >> Basic JavaScript: Access Multi-Dimensional Arrays With Indexes
// Setup
var myArray = [[1,2,3], [4,5,6], [7,8,9], [[10,11,12], 13, 14]];

// Using bracket notation select an element from myArray such that myData is equal to 8.
var myData = myArray[2][1];

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post

PowerShell: Send Email Notifications to Computer Users Before Maintentance

# sendEmailToUsers.ps1 # Query Active Directory for computers running a Server operating system #$targetServers =…

PowerShell: Use RoboCopy & Volume Shadow Copy to Mirror Terrabytes of Data

version 0.2 <#.DescriptionCurrent Features:1. Check for any errors on the Sources or Destinations and generate…

JavaScript: Build a Tribute Page

Demo: https:// codepen.io/dragoncoin/pen/EZJxYY HTML Code: <html><head> <body> <img src="http://www.animationxpress.com/wp-content/uploads/2015/10/Mahatma-Gandhi.jpg"> <h1>Mahatma Gandhi</h1> <div class="hidden"> <h2>"You must…