Just wondering, what is the most efficient way to divide an array by a scalar? I can clearly loop over it, but efficiency is paramount in my case.
Common trivial way:
var array_2 = []
var array_1 = [original_data
var divisor = my_scalar
for(var i = 0, length = array.length; i < length; i++){
array_2.push(array[i]/divisor)
}
Any trick I can use (or a new approach altogether)?