Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
That is enough reason IMO, but it's like when you borrow a book, you don't tear some pages up. Check this out: https://www.freecodecamp.org/news/pure-function-vs-impure-function/
In this particular case, the expected answer is calculated after your answer, so, if you mutated the input, the expected results could be different/wrong and that's why the random tests fail.
I'm sorry but why to NOT mutate input object? It doesn't seems to make any difference here except for the random tests failing.
@Chrono79
Oof. Cardinal sin. Thanks.
Don't mutate the input object.
In JS the static tests seem to work, but the random tests always expect to return 1 despite 1 rarely being the nexus.