You are viewing a single comment's thread. Return to all comments →
function sides(literals, ...expressions) { const A = expressions[0]; const P = expressions[1]; const s1 = (P + Math.sqrt((P * P) - (16 * A)))/4; const s2 = (P - Math.sqrt((P * P) - (16 * A)))/4; return [s1, s2].sort((a, b) => a - b); }
Seems like cookies are disabled on this browser, please enable them to open this website
Day 5: Template Literals
You are viewing a single comment's thread. Return to all comments →