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.
Shouldn't be any issue with modifying the given parameter as we are told that we "can assume that all inputs are valid integers".
From MDN:
"Parameters are essentially passed to functions by value — so if the code within the body of a function assigns a completely new value to a parameter that was passed to the function, the change is not reflected globally or in the code which called that function.
When you pass an object as a parameter, if the function changes the object's properties, that change is visible outside the function."
Agree that this shouldn't be considered best practice. Clean code tho.
can someone explain how this works? im lost. lol
Yeah! Simple and efficient method! Nice work champ!
'Fixed, see comments above'
I like this...i dont know why.
.
Seems like fixed
Tests aren't correct. They're omitting non-duplicate values.
I am getting a result that says "expected: 0, instead got: 0" It passes for the number 0+ but for numbers <0 I get this and I am positive my program works because I have tried it in an external environment so I am not sure why this won't accept my answer.
Fix up grammar in the instructions.
This has major issues but I have no pints to set it, kata description is totally wrong (there is wrong message, int variable mentioned while js has number and the mechanics are not clear enough) and tests are exceeding max number value
Be consistent with the instructions and tests. The instructions and the test ask for different error messages.