//Only to be used if you need the numbers var array = new Array(item1,item2,item3) for(i=0;i<array.length;i++){ if(i==2){ console.log(array[i]) } }