MIne is with .map(Number) which transform all the elements of the array into numbers. See line 2:
function areaTriangle([a,b,c]) {
[a,b,c] = [a, b, c].map(Number);//.map is converting all the elements in the array into numbers
let sp = (a + b + c) / 2;
let area = Math.sqrt(sp * (sp - a) * (sp - b) * (sp - c));
return area;
}
console.log(areaTriangle(["2", "3.5", "4"]));