Ad
  • Custom User Avatar

    Well, since codewars is an open community, expect the worst comment possible since people have different opinion on how things should be. By common algorithm, I think this is already a correct and good one. Although, language-wise, yes it can still be improved.

    Don't let this makes you not listen to the actual suggestion and improvement that is given from the comment, though. Just remember, in programming, there are many "best practices" out there. So, it's obvious if people have different opinion and just belittle others' solution. Don't let it get to you too much, and just keep learning.