const array = [];
for (let i = 0; i < 10; i++) {const randomNumber = Math.floor(Math.random() * 91) - 10;array.push(randomNumber);}
const maxNumber = Math.max(...array.filter(num => num > 25));
const newArray = array.map(num => num > 25 ? maxNumber : num);
console.log(newArray);
const array = [];
for (let i = 0; i < 10; i++) {
const randomNumber = Math.floor(Math.random() * 91) - 10;
array.push(randomNumber);
}
const maxNumber = Math.max(...array.filter(num => num > 25));
const newArray = array.map(num => num > 25 ? maxNumber : num);
console.log(newArray);