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: Set Autologon for Windows

Current Version: function setAutoLogon($username,$password){ $regWinlogon='REGISTRY::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon' $regKeyUsername='DefaultUserName' $regKeyPassword='DefaultPassword' $kegKeyAutologin='AutoAdminLogon' $regKeyDefaultDomain='DefaultDomain' function testCredential($username,$password){ # Get current…

PowerShell: Implementation of Anonymous Self Executing Function

JavaScript has this. It's a little known secret that PowerShell can do this as well.…

Basic JavaScript: Comparison with the Strict Inequality Operator

function testStrictNotEqual(val) {// Only Change Code Below this Line// Add the strict inequality operator to…