📅  最后修改于: 2022-03-11 15:01:46.510000             🧑  作者: Mango
//Day 5: Template Literals hackerrank 10 days of javascript solution
function sides(literals, ...expressions) {
const [area, perimter] = expressions;
const s1 = (perimter + Math.sqrt(Math.pow(perimter,2) - 16 * area))/4;
const s2 = (perimter - Math.sqrt(Math.pow(perimter,2) - 16 * area))/4;
return [s1,s2].sort();
}