const list = [1, 2, 3, 4, 5]; const {0: first, length, [length - 1]: last} = list; console.log(first, last, length); 1 5 5from: https://twitter.com/adhrinae/status/1536536558589083648?s=20&t=JBThRCqhnJdfPgFWlwFHLw