var str; var displayedNum; for (i in imgURLArray){ str = \"\" + \"\"+ (1+i) + \"\" + \"\
Try wrapping numbers in Number()
Like:
var i = 1; var str = "foobar" + Number(1+i) + "other stuff";