while($serachWords.firstChild){
$serachWords.removeChild($serachWords.firstChild);
}
while($serachWords.lastChild){
$serachWords.removeChild($serachWords.lastChild)
}
const arr = [1, 2, 3, 4, 5]
console.log(arr.slice(0, 2)) // [1, 2]
const arr = [1, 2, 3, 4, 5]
console.log(arr.slice(-4, -2)) // [2, 3], 뒤에서 2개 삭제
console.log(arr.slice(-3)) // [3, 4, 5]