Loop JS function in Ad banner

Can you share your Hype document where this is failing so we can take a look? There’s a few threads and downloadable examples on how to do this also: Set number of loops is one.