const EleList = [1,2,3]
name = 'Ele'
const render = function(type){
window[type + 'List'].forEach(function(value){
console.log("LOL")
});
render('Ele')
I'm trying to dynamically call an array using a string. What should I replace "window[name + 'List']" with in order to achieve this?