• Sign Up
  • Kata
  • Kumite
  • Blog
  • Forum
  • Wiki
  • Leaders
  • Log In
  • Sign Up
Name:Tamio Honma
Clan:ACID Maniacs
Member Since:Jan 2019
Last Seen:Jul 2020
Profiles:
Following:7
Followers:7
Allies:7
View Profile Badges
  • Stats
  • Kata
  • Collections
  • Kumite
  • Social
  • Discourse
  • Conversations (9)
  • Replies
  • Authored
  • Needs Resolution
    • IOIO72
    • created a suggestion for "Remove anchor from URL" kata

    For "real world use", I think a string without an hash should be tested as well:
    check('www.codewars.com', 'www.codewars.com')

    • IOIO72
    • commented on "Sum Strings as Numbers" javascript solution

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

    • Voile
    • commented on "Sum Strings as Numbers" javascript solution

    You are supposed to write yourself all the solutions

    It has nothing to do with having to write everything from scratch.

    • IOIO72
    • commented on "Sum Strings as Numbers" javascript solution

    ROTFL!

    • IOIO72
    • commented on "Sum Strings as Numbers" javascript solution

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

    • IOIO72
    • commented on "Range Extraction" javascript solution

    Crazy initialization by 9007199254740992 ... 😆

    • IOIO72
    • commented on "Human readable duration format" javascript solution
    1. instead of val += you could also write val = val + ...
    2. You asked about val += val. The second val doesn't belong to the first one. It belongs to the comparison val > 1.

    I usually use brackets for better readability:

    val += (val > 1) ? ' ' + key + 's' : ' ' + key
    

    If you use a template string, you could write it like so:

    val = `${val} ${key}${(val > 1) ? 's' : ''}`
    

    Hope I didn't code it wrong ;)

    • IOIO72
    • commented on "Human readable duration format" javascript solution

    I like this solution. Few and performant code! Well done.

    • IOIO72
    • commented on "Get the Middle Character" javascript solution

    I like it.
    Nevertheless one should notice that substr() is marked as deprecated:
    https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/substr

  • © 2021 Codewars
  • About
  • API
  • Blog
  • Privacy
  • Terms
  • Contact
  • powered by

Confirm

  • Cancel
  • Confirm