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.
You're probably mixing up inputs and outputs of different test cases.
There's a test with Momsie being the input with the expected result
false
unpublishing as a duplicate with many long standing issues.
How is "momsie" a palindrome?
The test case is wrong, I guess.
Removed tests for null and undefined because input validation in this kata is worthless anyway.
because somebody passed in a number instead of a string! surprise input validation! how fun! :D
Could someone please explain, why this is? And point me in right direction
Passing all tests, however encountering this error msg
TypeError: stringToTest.replace is not a function
at isPalindrome
at Object.handleError
at ContextifyScript.Script.runInThisContext
at Object.runInThisContext
Thank you guys, I will spend a bit more time here before posting another katas for sure.
Thanks
@dpleshkov
for adding the random tests. And since@JohanWiltink
has already raised an issue concerning duplicates (I tend to focus more on random tests) I will be closing this issue.Added random tests as a contributor. And yes, there are many similar kata out there.
Alright, thanks!
Make it better? Make it stand out? Make it the best there is?
Honestly? You may need to build some more experience on here to make that happen. But you can try!
Shall I removed it or leave it?
It's a duplicate. With 21 other search results for "palindrome" on JavaScript, yes, that's an issue.
If you're going to ask for the most efficient implementation, at least measure a solution's efficiency. Yes, it is possible to measure the time it takes a solution to run the tests. No, it's not an exact science, because of varying server load. But with that addition to the tests (huge tests if you want to measure anything other than 0 ms, but hey, that can be done), you would have something that's not the umpteenth duplicate.
As it is, you don't even have random tests. Which, admittedly, allows for very, very efficient "solutions".
22 including yours. But sure, we need one more.
Loading more items...