• 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
picodealion Avatar
Name:Stephan Muller
Clan:SO Chat
Skills:javascript
Member Since:Aug 2015
Last Seen:Mar 2017
Profiles:
Following:19
Followers:21
Allies:19
View Profile Badges
  • Stats
  • Kata
  • Collections
  • Kumite
  • Social
  • Discourse
  • Conversations (9)
  • Replies
  • Authored
  • Needs Resolution
  • Custom User Avatar
    • Shaba-Rex
    • commented on "String Templates - Bug Fixing #5" python solution
    • 3 years ago

    Yeah learn something new.
    Thanks :).

  • Custom User Avatar
    • paragonHex
    • commented on "Failed Filter - Bug Fixing #3" javascript solution
    • 10 years ago

    Yeahh, mine neither. :)
    Note to myself: Never trait written code even as something to start from!

  • Custom User Avatar
    • matt c
    • commented on "Failed Filter - Bug Fixing #3" javascript solution
    • 10 years ago

    Well this is a bug fixing kata so other solutions aren't exactly following in the spirit of things.

  • Custom User Avatar
    • picodealion
    • commented on "Failed Filter - Bug Fixing #3" javascript solution
    • 10 years ago

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

  • Custom User Avatar
    • picodealion
    • created an issue for "Greeting My Friends" kata
    • 10 years ago

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

  • Custom User Avatar
    • picodealion
    • commented on "Sum of Digits / Digital Root" javascript solution
    • 10 years ago

    To map an array of strings to numbers you can simply use .map(Number). I'm assuming you tried .map(parseInt) (which fails because of the second implied argumetn) but with Number it does work without an additional anonymous function.

  • Custom User Avatar
    • picodealion
    • commented on "Format a string of names like 'Bart, Lisa & Maggie'." javascript solution
    • 10 years ago

    Popping the last person to append with an ampersand is pretty clever. Also ES6 string interpolation looks a lot better than concatenating. I probably wouldn't use logic inside them though, instead save it to a var first for readability of the string.

  • Custom User Avatar
    • picodealion
    • commented on "Candy problem" javascript solution
    • 10 years ago

    I wish there was a 'funny' upvote button for the fatKid var

  • Custom User Avatar
    • picodealion
    • commented on "Binary Calculator" javascript solution
    • 10 years ago

    I disagree, eval is only evil when applied on input you don't have full control over.

    You define your own operations object which uses only strings you defined, so it's pretty safe. The parseInt on n1 and n2 also makes sure nothing except numbers will come through, so those are safe too.

    Either way I wouldn't vote this as best practice, but in this case eval is shorter than a switch and just as safe.

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

Confirm

  • Cancel
  • Confirm

Collect: undefined

Loading collection data...