const nums = [10, 5, 8, 12, 3];
const max = Math.max(...nums);
const min = Math.min(...nums);
console.log(max - min);
WebDEV #test #Frontend
Выберите правильный вариант 👇🏼
WE WebDEV @webb_dev · 8.3K subscribers const nums = [10, 5, 8, 12, 3];
const max = Math.max(...nums);
const min = Math.min(...nums);
console.log(max - min);