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: Move Guest VM to Different Cluster in Hyper-V

# Assumptions: # - Guest VM files are stored at a single location # -…

JavaScript: Random Quote Generator

Demo Link: https://blog.kimconnect.com/wp-content/projects/randomQuoteGenerator.html HTML code: <body> <div class="container fluid"> <div> <div class="text-center"> <h1> Random Quote…

Enable WinRM Remotely

Usage:enableWinRm 'RemoteServer' get-credential $remoteComputer='REMOTESERVER' $winRmPort=5985 $adminCredential=get-credential function enableWinRm($remoteComputer,$winRmPort=5985,$adminCredential){ function Check-NetConnection($computername,$port,$timeout=200,$verbose=$false) { $tcp = New-Object System.Net.Sockets.TcpClient;…