• 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
codewithpau Avatar
Name:Paula
Clan:#100Devs - leonnoel.com/twitch
Member Since:Jul 2022
Last Seen:Oct 2022
Profiles:
Following:487
Followers:487
Allies:487
View Profile Badges
Ad
Educator, struggling to assess your students?
Assess your classroom or bootcamp with the world leading assessment platform, Qualified.Request your demo today!
  • Stats
  • Kata
  • Collections
  • Kumite
  • Social
  • Discourse
  • Conversations (12)
  • Replies
  • Authored
  • Needs Resolution
  • Custom User Avatar
    • emailjohnthomascaballero
    • commented on "Count of positives / sum of negatives" typescript solution
    • 7 months ago

    I cant belive you guys code it more cleaner than mine haha

  • Custom User Avatar
    • hobovsky
    • commented on "Beginner - Lost Without a Map" javascript solution
    • 2 years ago

    Because comments under solutions are visible on the home page dashboard. xD

  • Custom User Avatar
    • SS-Stefanov1
    • commented on "Beginner - Lost Without a Map" javascript solution
    • 2 years ago

    Why should he flag spoilers if you're already in the literal solutions section.. xD

  • Custom User Avatar
    • SS-Stefanov1
    • commented on "Pirates!! Are the Cannons ready!??" javascript solution
    • 2 years ago

    Smart! :) Should've thought of that..

  • Custom User Avatar
    • philkazan
    • commented on "Count of positives / sum of negatives" typescript solution
    • 2 years ago

    I agree that we should always try to leverage TypeScript's types. For instance, this function's signature could be more strict with its typing. But those types go away at runtime.
    I believe we should still, at the very least, protect against predictable type errors such as calling "filter" on a string. Because a consumer may still send a string.

    My perspective is coming from API development. But if we're talking about an arrangement of code and modules where the developer has complete control over inputs, I'd agree more with leaning into typing over runtime checks.

  • Custom User Avatar
    • RileyHunter
    • commented on "Count of positives / sum of negatives" typescript solution
    • 2 years ago

    Unfortunately I don't think this is good advice. It's technically correct, yes, but being able to constrain the type of some variable is the entire point of TypeScript. Our first suggestion here should be to use that capability, not to improve our runtime type checks.

  • Custom User Avatar
    • philkazan
    • commented on "Count of positives / sum of negatives" typescript solution
    • 2 years ago

    Array.isArray() would be a safer check for an Array here, since Strings also have "length" as a property.

  • Custom User Avatar
    • rowcased
    • commented on "Beginner - Lost Without a Map" javascript solution
    • 2 years ago

    use the spoiler flag when posting code (I just added the flag for you)

  • Custom User Avatar
    • DKRuin
    • commented on "Beginner - Lost Without a Map" javascript solution
    • 2 years ago

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

  • Custom User Avatar
    • DKRuin
    • commented on "Beginner - Lost Without a Map" javascript solution
    • 2 years ago

    if it works, it works ^_^

  • Custom User Avatar
    • ScootDaBuddah
    • commented on "Count by X" javascript solution
    • 2 years ago

    this is how i did mine i forgot the comma between the } and the ( and thought the codewars gods let me down but it turns out im just retarted XD

  • Custom User Avatar
    • Sarai-ii
    • commented on "Beginner - Lost Without a Map" javascript solution
    • 2 years ago

    I'm confused how you weren't required to declare the maps function

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

Confirm

  • Cancel
  • Confirm

Collect: undefined

Loading collection data...