Код: Выделить всё
const sumAll = function(x, y) {
let sum = 0;
if (x < 0 || y< 0 || isNaN(x) || isNaN(y) || Number(x) !== x || Number(y) !== y ) {
return "ERROR";
} else { if (x > y) {
for (let i = y; i
Подробнее здесь: [url]https://stackoverflow.com/questions/79497145/how-do-i-return-error-with-non-integer-parameters[/url]
Мобильная версия