Ad
  • Default User Avatar

    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

  • Custom User Avatar

    unpublishing as a duplicate with many long standing issues.

  • Custom User Avatar

    How is "momsie" a palindrome?

    The test case is wrong, I guess.

  • Custom User Avatar

    Removed tests for null and undefined because input validation in this kata is worthless anyway.

  • Custom User Avatar

    because somebody passed in a number instead of a string! surprise input validation! how fun! :D

  • Default User Avatar

    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

  • Custom User Avatar

    Thank you guys, I will spend a bit more time here before posting another katas for sure.

  • Custom User Avatar

    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.

  • Custom User Avatar

    Added random tests as a contributor. And yes, there are many similar kata out there.

  • Custom User Avatar
    1. Duplicate of many Kata out there, whether Beta or approved
    2. Needs random test cases
  • Custom User Avatar

    Alright, thanks!

  • Custom User Avatar

    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!

  • Custom User Avatar

    Shall I removed it or leave it?

  • Custom User Avatar

    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".

  • Custom User Avatar

    22 including yours. But sure, we need one more.

  • Loading more items...