Hacker News new | ask | show | jobs
by kondrei 812 days ago
I have this problem with splice and slice too
3 comments

I try to get by with slice() since it is simpler to understand. Semantics is "taking a slice". splice() has a meaning of not only splitting but also putting slices back together, and is used less often. I too always have to look up its definitions from docs, partly because I use it so infrequently.
Oof same, I'm always going back to the docs for these
I somehow remembered that with : splice is more „evil“ because it changes the original. I know, it makes no sense ..