is it possible to convert Function Parameter string to Array name?
function SwitchElement(type){
var cur = type.indexOf(document.getElementById(type).src);
console.log(cur);
if(cur < eyes.length-1){
}
}
So that "type" is Addressed as array name.
If so, how? I am trying to do it just like that function but it returns me index -1
Note: Div of element and Arrayname share same name.
getElementByIdwould not make sense.