Ad
  • Default User Avatar

    First, this comment should not be in this discussion. It should be in the discorse of that kata. (As spoiler content)

    And a hint to your problem: Is {1,1,2} a triangle? Your solution return true.

  • Custom User Avatar

    Hello fellow coders! I'm having some trouble with this kata, and I have no idea which tests I am failing so any help without giving me the whole solution would be great: On Test 1, the first three cases I'm supposed to return false while I seem to be returning true.

    My code:

    function isTriangle(a,b,c){
      if((a <= 0) || (b <= 0) || (c <= 0)) {
        return false;
      }
      else if((a + b < c) || (a + c < b) || (b + c < a)) {
        return false;
      }
      else {
        return true;
      }
    }