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.
This comment is hidden because it contains spoiler information about the solution
I could not find any solution actually doing this because of built-in copy or const ref semantics but added a test for it anyways:
https://www.codewars.com/kumite/67346c955b6178ce3d28a71e?sel=67346c955b6178ce3d28a71e
me too... was expecting a 2 minute one liner for a dopamine boost lol
trickier than it looks, nice little wake up call
Approved.
@natan True, but the whole point was about me beeing confused. It just took B1t's message to make me realize the problem. Thx anyway :)
literally the first thing I told you
Thanks B1ts! Finally a good information that solved the misunderstanding!
Just in case:
VM1509:1 Uncaught EvalError: Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "script-src chrome://resources chrome://webui-test 'self'".
No offense but yes, I read your comments, and exactly from your comments i figured out that most probably you did what you think was cloning, but really was not ;)
Because they cloned it? It doesn't affect the original array.
myvar = inputvar
doesn't clone anything, it's just another variable name pointing to the same input array.read my second one. Thats what I mean. It should not be this way. Anyway...thanks for trying
read my first reply in this thread
I can't remember for sure but I was doing something like this:
myvar = inputvar
doing stuff with myvar and return it
feedback: You are not allowed to mutate...:(
so how can other people swap stuff arround with cloned arrays?
this is what's going on:
Loading more items...