//Resolved
In my attempt to add the parameters together and then divide by 2 to pass the result into the sqrt method, I encountered an issue where only the last parameter of the function was being returned.
When using typeof, it indicated that the arguments were numbers, so I'm uncertain about what is causing this problem.
function calculateTriangleArea(x, y, z) {
let area, perimeter;
perimeter = (x + y + z)/2;
//Heron's formula
area = Math.sqrt(perimeter * ((perimeter - x) * (perimeter - y) * (perimeter - z)));
return area;
}
//calculateTriangleArea(3, 3, 9) The perimeter returned 9 as the argument for c, while it should have been 7.5.