const nums = []
for (let i = 1000; i--;) {
nums.push(Math.floor(Math.random() * 601 - 300))
}
let result
result = nums.map(n => +`1e${n}`)
// has rounding errors
result = nums.map(n => 10 ** n)
// has rounding errors
result = nums.map(n => Math.pow(10, n))
// ...also has rounding errors
result = nums.map(n => {
let product = 1
for (let i = 0; i < n; i++) {
product *= 10
}
for (let i = 0; i < -n; i++) {
product /= 10
}
return product
})