I have a string variable which contains the name of an array. What I\'d like to do is access an element of that array. And write it to another variable. How can I do this?
You could use something like:
var arrayName = "sample", number = window[arrayname][1];