const arr = [1, 2, 3, 4, 5];
const first = arr.shift();
const last = arr.pop();
console.log(first + last, arr.length);
WebDEV #test #Frontend
Выберите правильный вариант 👇🏼
WE WebDEV @webb_dev · 8.3K subscribers const arr = [1, 2, 3, 4, 5];
const first = arr.shift();
const last = arr.pop();
console.log(first + last, arr.length);