violet withdrawal6 months agoconst solve = (intArray) => { intArray.shift() return intArray; }; CancelSubmit

payment Fish backing up8 months agoI'm a little embarrassed that it took me as long as it did. const solve = (intArray) => { intArray.shift() return(intArray) }; I kept trying to do .shift inside the return which was only showing me what was being shifted off the array, not what remained. CancelSubmit

Kara Diaby2 years agoconst solve = (intArray) => { return intArray.splice(1) }; `` CancelSubmit Ameliorated Tugrik8 months agoDid in one line - Well done! Sometimes forget about an obvious solution! :) CancelSubmit

Ameliorated Tugrik8 months agoDid in one line - Well done! Sometimes forget about an obvious solution! :) CancelSubmit

Stanislav2 years agoLooks clear with array destruction. const solve = (array) => { const [first, ...rest] = array; return rest; } CancelSubmit

Savings Account Ergonomic2 years agoconst solve = (intArray) => { return intArray.filter((item,index)=>index!=0);}; CancelSubmit

jon snow2 years agoconst solve = (intArray) => { return intArray.slice(-(intArray.length)+1) }; CancelSubmit

Juan Luis Rojas León2 years ago// shift removes the first element from an array const solve = (intArray) => { intArray.shift(); return intArray }; CancelSubmit

## Comments

Bhargav4 months agoviolet withdrawal6 months agoconst solve = (intArray) => { intArray.shift() return intArray; };

payment Fish backing up8 months agoI'm a little embarrassed that it took me as long as it did.

`const solve = (intArray) => { intArray.shift() return(intArray) };`

I kept trying to do .shift inside the return which was only showing me what was being shifted off the array, not what remained.

SAS2 years agoconst solve = (intArray) => { return intArray.slice(1); };

Kara Diaby2 years agoconst solve = (intArray) => { return intArray.splice(1) }; ``

Ameliorated Tugrik8 months agoDid in one line - Well done! Sometimes forget about an obvious solution! :)

Stanislav2 years agoLooks clear with array destruction.

`const solve = (array) => { const [first, ...rest] = array; return rest; }`

Savings Account Ergonomic2 years agoconst solve = (intArray) => { return intArray.filter((item,index)=>index!=0);};

jon snow2 years agoconst solve = (intArray) => { return intArray.slice(-(intArray.length)+1) };

Juan Luis Rojas León2 years ago