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.
Nowhere is it mentioned that input should not be mutated.
If it's because mutating the input breaks the tests, then the test code is subpar and they should be written so that mutating the input does nothing.
"Variables" are just name tags, they can point to the same object, like in JS:
If you want to work with them you need to copy every object (read: anything that's not a primitive value):
I am receiving this error: "Your function returns the correct result. However, it modifies the input arrays. Try not to change them. They might be used somewhere else."
My solution worked for 100% of tests but is still overall failing here. My solution creates new variables from the input arrays. Any tips on where I am failing?
This comment is hidden because it contains spoiler information about the solution
this is what i understand is going on:
Lyanna shared 50 (or put in 50) and then borrowed (or took out 500). so in total Lyanna borrowed (took out) 450. but the 'kitty' is shared 50/50, so half of what Lyanna took out is for her to use, and the other half (225) should be for Elia. So Lyanna owes Elia that 225. hopefully that makes sense...
nice work!