You can also use it to shrink array
const array = [1, 2]
array.length = 1
console.log(array) // 
WOOO! never thought of that! Adding to my notes!!! thanks for sharing 😁
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.