I need a function that basically just multiplies members of an array by 100. The number of members of the array may change. Also, I can't use something like array.prototype.map - it has to be a loop.
Here's what I've got so far, but newArray comes back as undefined... What am I doing wrong?
var a = [1, 2, 3];
function toPts(array){
for(var i=0; i<array.length; i++){
array[i] *= 100;
}
}
var newArray = toPts(a);
The end result needed is newArray = [100, 200, 300]