JSFiddle - React, Tailwind, and code Playground

JavaScript

var myArray = []
myArray.push('A String')
console.log(myArray.length) // got: 1
myArray['aRandomKey']='An Other String'
console.log(myArray.length) // got: 1

myArray[1] = "2nd string";
console.log(myArray.length);// you'll get 2

console.log(myArray.aRandomKey); // An Other String
console.log(myArray["aRandomKey"]); // An Other String
console.log(myArray) // ["A String", "2nd string", aRandomKey: "An Other String"]