Ad
  • Custom User Avatar

    It's Codewars, you can't those ratings too seriously. People just like to see short one liners regardless of readability and efficiency.

    Sometimes you can learn interesting tricks from them too.

  • Custom User Avatar

    It is definitely not recommended. It looks clever but that's it. When you work with other developer, readability is more important. I just think it is a cool way to solve problem. But it could also mean code efficiency, eg your code use less variable etc. I could be wrong.

  • Default User Avatar

    I am seeing 👀 many people upvoting 🗳️ the single-line solutions.

    Whereas It not a recommended practice where there are many operations are going on.

    Because it compromises the code readability.

    What do other people think ❓

    single line solution should be supported and recommended or deserve downvote ❓