I have javascript function that add numbers to array start form min to max and increase by step but when I use getNumbers(2, 20, 2); it print 2,22,222,2222,.... It doesn't increase can anyone help me please.
function getNumbers(min, max, step) {
var i;
for(i=min ; i<max ; i+=step){
array.push(i);
alert(array);
}
i+=stepso"2"+="2"will return22after that222and so on.