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.
Im convinced that someone, somewhere, will always know how to write my 50 lines of code in 1 line lol. Very clever. Well done!
I solved it.
The example above was not the result I intended to show, I hadnt corrected the bug in the kata, only my IDE, thats why there is an ay and repeated '!' marks.
This is what I intended to show: expected 'Oay emporatay oay oresmay!' to equal 'Oay emporatay oay oresmay !'
My comment above, in reference to 'not making any sense' was explaining that it makes no sense to have a space in between a word and the punctuation. My result left the punctuation in the correct place (grammatically) after each word that had punctuation (including my own test cases using commas, periods, etc) which is why it failed. I assumed that maybe the example was a typo, clearly I was wrong. This kata was as garbage as my code for it is. Im out.
expected 'Oay emporatay oay oresmay !!ay! ' to equal 'Oay emporatay oay oresmay !'
I dont understand if the space between the word and exclamation mark is intentional or not but it makes no damn sense and is the reason my code wont pass. Can someone clarify? I see some other comments here concerning the same thing but it seems that not all the test cases follow this rule as I failed one or two assertions with the assumption that punctuation doesnt follow immediately after a word. i fixed it to assume punction WILL immediately follow, i fail a different test case. Again... Why?
hisTay hitsay siay admay tupidsay, ightray?
This comment is hidden because it contains spoiler information about the solution
This helped me as well. Thank you for the explanation. I ended scrapping the the use of splice() simply becuase i couldnt figure that out. ended up just deleting the element in the list using delete and using filter to filter out falsy values that were not === 0 till i got what was needed. This was helpful to understand though. Thanks again
This comment is hidden because it contains spoiler information about the solution
I like this approach. Well Done. Much cleaner than mine and its still very readable.
People in here are talking mad shit because they cant get away from assuming that everyone on this website is at their level. For some of us, like myself, ive been teaching myself for > 6 months, we dont know how to do everything in one line, and we dont always know when to use one solution vice another. Please chill out.
This comment is hidden because it contains spoiler information about the solution