You are viewing a single comment's thread. Return to all comments →
although I didn't understand what's the point of literals
function sides(literals, ...expressions) { const [area, perimeter] = expressions const s1 = (perimeter + Math.sqrt(perimeter**2 - 16*area)) / 4 const s2 = (perimeter - Math.sqrt(perimeter**2 - 16*area)) / 4 const arr = [s1, s2] return arr.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 →
Easiest solution:
although I didn't understand what's the point of literals