SO - 29136692 by Arun P Johny March 19, 2015 JavaScript var s = []; for (var i = 1; i <= 10; i++) { s.push("'id" + i + "'"); } alert(s);