• 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
gingernaps Avatar
Name:Riikka Pennanen
Clan:Founders & Coders
Member Since:Nov 2016
Last Seen:Apr 2017
Profiles:
Following:216
Followers:209
Allies:208
View Profile Badges
  • Stats
  • Kata
  • Collections
  • Kumite
  • Social
  • Discourse
  • Conversations (120)
  • Replies
  • Authored
  • Needs Resolution
  • Custom User Avatar
    • Hamdansyam
    • commented on "Sum without highest and lowest number" javascript solution
    • 6 months ago

    cool!

  • Custom User Avatar
    • x4g4p3x
    • commented on "Sum without highest and lowest number" javascript solution
    • 12 months ago

    This solution only works due to incomplete testing. It checks whether a is truthy. Here are some possible falsy cases in JavaScript:

    false,
    null,
    0,
    NaN,
    "" (empty string),
    undefined

    So if you have any value other than these, such as a string like "abc" or simply the boolean true, this function wouldn’t work.

    Additionally, even though this is a function expression, which is good practice, you should use the const keyword. Not using it is considered bad practice. And don’t forget the semicolon at the end.

  • Custom User Avatar
    • x4g4p3x
    • commented on "Sum without highest and lowest number" javascript solution
    • 12 months ago

    Not entirely true since null or an empty array are falsy. Though when you get a string or a number other than 0, those are truthy. Or what if you have a variable with "true" as its value? Your solution is correct though.

  • Custom User Avatar
    • Ch4ppi3
    • commented on "Sum without highest and lowest number" javascript solution
    • 2 years ago

    his solution is good to use after you check that array is valid

  • Custom User Avatar
    • Apkaguu
    • commented on "Beginner friendly: Lowercase letters" kata
    • 2 years ago

    Нормальная ката, для 8 kyu самое оно, то что надо

  • Custom User Avatar
    • mrbilalarain
    • commented on "Sum without highest and lowest number" javascript solution
    • 2 years ago

    mine checks for everything ofcours we need sort

  • Custom User Avatar
    • chjuge
    • commented on "Sum without highest and lowest number" javascript solution
    • 2 years ago

    You sort old array, then create new one. For what? This solution is too slow on large inputed arrays.

  • Custom User Avatar
    • vinicius-grandi
    • commented on "Sum without highest and lowest number" javascript solution
    • 3 years ago

    too much letters

  • Custom User Avatar
    • RachelBanana03
    • commented on "Sum without highest and lowest number" javascript solution
    • 3 years ago

    Wow!

  • Custom User Avatar
    • NikitaVologdin
    • commented on "Sum without highest and lowest number" javascript solution
    • 3 years ago

    difficult to read

  • Custom User Avatar
    • hestamp
    • commented on "Sum without highest and lowest number" javascript solution
    • 3 years ago

    Holy code!

  • Custom User Avatar
    • fxlApril
    • commented on "Sum without highest and lowest number" javascript solution
    • 3 years ago

    array?.length>2 yes

  • Custom User Avatar
    • jabel123
    • commented on "Sum without highest and lowest number" javascript solution
    • 3 years ago

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

  • Custom User Avatar
    • NatYarm
    • commented on "Sum without highest and lowest number" javascript solution
    • 3 years ago

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

  • Custom User Avatar
    • Lee1887
    • commented on "Sum without highest and lowest number" javascript solution
    • 3 years ago

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

  • Loading more items...
  • © 2025 Codewars
  • About
  • API
  • Blog
  • Privacy
  • Terms
  • Code of Conduct
  • Contact

Confirm

  • Cancel
  • Confirm

Collect: undefined

Loading collection data...