var slide = document.querySelectorAll(".slide"), slideAnimation = []; var slideTL0 = new TimelineMax(); var slideTL1 = new TimelineMax(); var slideTL2 = new TimelineMax(); var slideTL3 = new TimelineMax(); for(i=0;i<slide.length;i++){ slideAnimation.push(slideTL + i);// how to conditionally refrence a variables name, in this cae using i } slideAnimation[2].play();   I'm working on something where I'd like to push some timelines to an array based on having the index position