let array = [1, 2, 3, 4, 5, 6, 7]
function multBy(arr, n) {
for (let i = 0; i < arr.lenght; i++) {
return arr[i] = arr[i] * n
}
}
console.log(multBy(array, 5))
function multBy(arr, n) {
for (let i = 0, len = arr.length; i < len; i++) {
arr[i] *= n;
}
return arr;
}