Here is my problem. PictureLenth is my picture array length, and ProductImage is a list. I can't use now to point my array address on ProductImage. How can I use javascript var on {{}}?
lenth = {{ PictureLenth }}-1;
now = 0;
function t_setInterval() {
window.intervalParam = window.setInterval(function() {
var date = new Date();
   if (lenth>now)
   {now = now + 1;}
   else
   {now = 0;}
    var img = document.getElementById("image");
    img.src="data:image/png;base64, {{ ProductImage[now] }}";
    return false;
}, 4000);
}
 
     
     
    