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.
My code appears to be correct & I have checked it outside of CodeWars multiple times and it functions perfectly. However, when I hit "ATTEMPT" it comes back as failing 40 tests. After looking through the error messages, it looks to me like, for the tests I am failing, there is no closing ] on the input array which is causing an issue.
ex: I copied and pasted this error message:
Random tests
Testing for delete_nth([49, 10, 36, 10, 4, 33, 49, 4, 10, 33, 5, 32, 4, 10, 49, 32, 32, 10, 32, 4, 10, 49, 4, 33, 36, 33, 5, 49, 32, 32, 49, 4, 4, 33, 32, 5, 49, 49, 10, 4, 5, 49, 32, 10,2)
✘ It should work on random inputs too! - Expected: '[49, 10, 36, 10, 4, 33, 49, 4, 33, 5, 32, 32, 36, 5]', instead got: '[49, 10, 36, 10, 4, 33, 49, 4, 33, 5, 32, 32, 36, 5, [Function]]'
There is no closing ] before the 2 in the test input!! Using a separate code editor, outside of CodeWars, when I use my code, then I copy and paste the above test & I add in a closing bracket, everything works perfectly.
This seems like an issue with the tests & not my code. If I am wrong, please explain!!!
This comment is hidden because it contains spoiler information about the solution