Couldn't have explained it better.
Thank you Basit and Jason for clearing this up! I certainly should have mentioned the dangers of mutating our original dataset.
Nonetheless, having knowledge of how to use .splice as well as it's dangers could show mastery of JS in the context of an interview <3
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.