You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
return ((a + b > c) && (a + c > b) && (b + c > a)) ? true : false
}
}
module.exports = {isTriangle: isTriangle}
console.log(isTriangle(1, 1, 1))
console.log(isTriangle(4, 5, 6))
console.log(isTriangle(-3,3, 9))
// Write a function called isTriangle which takes an input of three non-negative numbers. It should return true if the three numbers could form the side lengths of a triangle and false otherwise.
// The sum of two sides of a triangle must be greater than the third side. If this is true for all three combinations, then you will have a valid triangle.