Recent | Popular
#css #css #items #array
const arr = ["This", "Little", "Piggy"]; const first = arr.slice(0, 1); const the_rest = arr.slice(1);console.log(first); // ["This"] console.log(the_rest); // ["Little", "Piggy"]
Fri Apr 24 2020 11:44:23 GMT+0000 (Coordinated Universal Time) https://css-tricks.com/snippets/javascript/getting-first-and-last-items-in-array-and-splitting-all-the-rest/