• 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
Yassinmoh Avatar
Name:Yassin Mohamed
Clan:Sarmady - Vodafone Company
Skills:javascript, es6, typescript, react.js, angular.js, node.js
Member Since:Aug 2022
Last Seen:Apr 2025
Profiles:
Following:1
Followers:0
Allies:0
View Profile Badges
  • Stats
  • Kata
  • Collections
  • Kumite
  • Social
  • Discourse
  • Conversations (6)
  • Replies
  • Authored
  • Needs Resolution
  • Custom User Avatar
    • Yassinmoh
    • commented on "Sum of Digits / Digital Root" kata
    • 3 years ago

    Thank's @benjaminzwhite problem is solved by adding = to >

  • Custom User Avatar
    • sid114
    • resolved a question on "Sum of Digits / Digital Root" kata
    • 3 years ago

    closing

  • Custom User Avatar
    • Chrono79
    • commented on "Sum of Digits / Digital Root" kata
    • 3 years ago

    Because you weren't returning the recursive call. Also, read this: https://docs.codewars.com/training/troubleshooting#expected-the-same

  • Custom User Avatar
    • Steve Ventis
    • commented on "Sum of Digits / Digital Root" kata
    • 3 years ago

    In my console code works perfect. Here doesnt work and i cannot understand why.
    Error: expected undefined to equal 7. In my console result is equal to 7. Can explain someone this error?

  • Custom User Avatar
    • benjaminzwhite
    • resolved an issue on "Sum of Digits / Digital Root" kata
    • 3 years ago

    Hi @Yassinmoh - it seems you are working in JavaScript; there are 65,000 solves in that language so tests seem to be working OK.

    As your error message says - you are returning the value 10. The kata says: "...If that value has more than one digit, continue reducing in this way until a single-digit number is produced."

    10 has more than one digit, so your solution is not correct, you need to keep performing the algorithm one more step (probably in your code you have something like when n <= 10: stop loop which should be < instead of <=)

  • Custom User Avatar
    • Yassinmoh
    • created an issue for "Sum of Digits / Digital Root" kata
    • 3 years ago

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

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

Confirm

  • Cancel
  • Confirm

Collect: undefined

Loading collection data...