For me slice is nice and handy method to take a part of an array without mutating the original. splice on the other hand is like a monster, because it mutates the original array.
Full-stack developer, web designer, teacher, and entrepreneur with a decade of experience. All things tech, TypeScript, React, NextJS, TailwindCSS, and vim.
I empower people to become software developers, especially those with kids/family responsibilities, full-time jobs, or who feel too old to start over. 🥰👩🏽💻
Location
Washington DC
Education
Duke University | The Firehose Project (coding bootcamp)
A self-taught Full stack developer, Software Engineer, and a Blogger 🤓
I love ♥️ building software that solves real-world problems, add value to society through technology.
always have to open docs for slice and splice :)
For me

sliceis nice and handy method to take a part of an array without mutating the original.spliceon the other hand is like a monster, because it mutates the original array.Haha, soo true.
I'm so thankful for
.mapnow. We used to have to do for loops manually and push to a new array!excellent post! thanks for sharing!
Simple and efficace post thanks !! :)
Great post! I would love to read a part 2.
Thank you 🥺
Nice and informative. Thanks for sharing ♥️
Hey Nice article, But can you check shift() and unshift() once again ASAP.
And map example too "numberOfWins".
Thanks so much for pointing those out! I appreciate your feedback.
"(Reduce) method takes two parameters, the accumulator and the current value" That's pretty reductive (no pun intended), since it takes four.
A complementary resource is doesitmutate.xyz/. It'll tell you if an array method mutates the value or copies it.