I have a javascript function that spits out some vbscript variables, but am sure how to use the javascript loop in tandem with it.

for example, alert('<%=games(1)%>'); displays the vbscript value of games(1). How can i have it display 1, 2, 3, etc through the loop?

for (i=0; i<=4; i++) {

alert('<%=games(" + i + ",3)%>'); doesn't work
alert('<%=games(' + i + ',3)%>'); also doesn't work.
}

is there a way to easily accomplish this?