Ad

Triangles can be classified into 3 types based on the size of their sides:
Equilateral: The three sides are equal. Isosceles: Two equal sides. Scalene: All sides are different.
Create a function that receives the lengths of the three sides of a triangle and returns its rank as
to the size of its sides. In this example, the mathematical conditions for the existence of a
triangle.

const triângulo = function (a, b, c) {
  if (a == b && b == c) {
    console.log("Equilateral");
  } else if (a == b && b != c) {
    console.log("Isosceles");
  } else {
    console.log("Scalene");
  }
};

triângulo(5, 3, 4);