Ad
  • Custom User Avatar

    random tip, I tend to read these like a sentence.. so 0 <= x <= 4 would read as: 0 is "less than or equal to" x and x is "less than or equal to" 4.

  • Custom User Avatar

    Wouldn't that render this kata trivial and not deserving a 5kyu rating?

  • Custom User Avatar

    the values for the x should be between those parameters

  • Custom User Avatar

    I already told you exactly which sample test your code is failing, use Pythontutor or other IDE to debug your code step by step and see what's wrong with it. Don't chain methods until you properly understand what they return in each of them, pull them apart and log what they return, you'll find out what's wrong with your code easier that way.

  • Custom User Avatar

    The tests have no problem with either method, it's your code that's trying to use them wrong, read the error message:

    TypeError: Cannot read properties of undefined (reading 'toUpperCase')
    

    undefined doesn't have toUpperCase method, that's a string method. Debug your code, add some console.log()s to help you with that. Read this: https://docs.codewars.com/training/troubleshooting

    Currently, your code fails this sample test:

    assert.strictEqual(generateHashtag("code" + " ".repeat(140) + "wars"), "#CodeWars")
    
  • Custom User Avatar

    You have to use the filter-method

    Did you read the description? "have to" means it is required.

    The title also says Filter in it and there is a link to MDN docs.

  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    Your team's score will always be between 0 and 4, both inclusive.

  • Custom User Avatar

    If you know someone who would want to update 2000 JavaScript kata, let me know. If you want to update at least some of them, reach out to me at #fixing channel of Codewars Discord, and I will explain you how to do this.

    Thanks!

  • Custom User Avatar

    You're missing g, h, and i there. So, the right alphabet's position is 10, not 7 as you said.