I am looking to find out why something that seems so simple, doesn't work like you'd expect it to.
Array1 = ["item1", "item2", "item3", "item4", "item5"];
Array1[0] = "changeditem1";
This method of using Array1[0] to change the array works fine and changes the value to changeditem1
["changeditem1", "item2", "item3", "item4", "item5"]
Though if you put it in a variable
var arrayvariable = Array1[0]
Attempting to then change the array using the variable using
arrayvariable = "changeditem1"
Array1 = ["item1", "item2", "item3", "item4", "item5"];
does nothing to the array. If someone could explain if there is something I am missing or what I am doing wrong, that would be great. Thank you.