const arr = [];for (let i = 0; i < 15; i++) {arr.push(Math.floor(Math.random() * 21) - 10);}
console.log(arr.join(' '));
const newArr = arr.map(num => num > 0 ? 0 : num);console.log(newArr.join(' '));
const arr = [];
for (let i = 0; i < 15; i++) {
arr.push(Math.floor(Math.random() * 21) - 10);
}
console.log(arr.join(' '));
const newArr = arr.map(num => num > 0 ? 0 : num);
console.log(newArr.join(' '));