• Sign Up
    Time to claim your honor
  • Training
  • Practice
    Complete challenging Kata to earn honor and ranks. Re-train to hone technique
  • Freestyle Sparring
    Take turns remixing and refactoring others code through Kumite
  • Community
  • Leaderboards
    Achieve honor and move up the global leaderboards
  • Chat
    Join our Discord server and chat with your fellow code warriors
  • Discussions
    View our Github Discussions board to discuss general Codewars topics
  • About
  • Docs
    Learn about all of the different aspects of Codewars
  • Blog
    Read the latest news from Codewars and the community
  • Log In
  • Sign Up
comborock Avatar
Name:Božidar
Clan:Unknown
Member Since:May 2020
Last Seen:Jun 2025
Profiles:
Following:0
Followers:0
Allies:0
View Profile Badges
  • Stats
  • Kata
  • Collections
  • Kumite
  • Social
  • Discourse
  • Conversations
  • Replies (6)
  • Authored
  • Needs Resolution
  • Custom User Avatar
    • hobovsky
    • commented on "I love you, a little , a lot, passionately ... not at all" kata
    • 6 days ago

    Your Python solution will not work in JavaScript. Your problems are caused exactly by the thing which works in Python, but not in JS. arr[-1] works differently in JS and Python.

  • Custom User Avatar
    • hobovsky
    • commented on "I love you, a little , a lot, passionately ... not at all" kata
    • 6 days ago

    With your updated code it is:

    Your code is using the expression nbPetals % ph.length - 1 to index the array, which can result in -1 when nbPetals is a multiple of 6.

    nbPetals % phrasess.length - 1 does not do what you think it does, but you need to take it from here.

  • Custom User Avatar
    • hobovsky
    • commented on "I love you, a little , a lot, passionately ... not at all" kata
    • 6 days ago

    Your code does not correctly calculate the position in the phrases array because the operator precedence is wrong. As a result, the selected index is outside the valid range, causing your function to return undefined instead of a phrase from the list.

    -- 🤖

  • Custom User Avatar
    • akar-0
    • commented on "Ones and Zeros" kata
    • 2 years ago

    When you ask for help, please ask for help and not just post code. Refer to this documentation to debug your code and ask for help efficiently: https://docs.codewars.com/training/troubleshooting/

  • Custom User Avatar
    • akar-0
    • commented on "Ones and Zeros" kata
    • 2 years ago

    Don't post solutions in discourse and use the spoiler flag when you post code somewhere.

  • Custom User Avatar
    • I_Gerry_I
    • commented on "Feature Requests" topic
    • 5 years ago

    https://www.codewars.com/kata/52685f7382004e774f0001f7 is this your challenge? you can also try going to "view profile" > "Kata" > "Unfinished"

  • © 2025 Codewars
  • About
  • API
  • Blog
  • Privacy
  • Terms
  • Code of Conduct
  • Contact

Confirm

  • Cancel
  • Confirm

Collect: undefined

Loading collection data...