const numbers = [1, 2, 3];
const pows = [];
for (let i = 0; i < numbers.length; i++) {
pows.push(numbers[i] ** 2);
}
console.log(pows) // [1, 4, 9]
const numbers = [1, 2, 3];
const pows = [];
numbers.forEach(item => pows.push(item ** 2));
console.log(pows) // [1, 4, 9]