Skip to content

Instantly share code, notes, and snippets.

@codeperfectplus
Created September 11, 2023 08:31
Show Gist options
  • Select an option

  • Save codeperfectplus/31a67ad86a2e19b03f6ed23e00de92aa to your computer and use it in GitHub Desktop.

Select an option

Save codeperfectplus/31a67ad86a2e19b03f6ed23e00de92aa to your computer and use it in GitHub Desktop.
function sides(literals, ...expressions) {
const [a,p] = expressions;
const root = Math.sqrt((p*p)-(16*a));
const s1 = (p+root)/4;
const s2 = (p-root)/4;
return ([s2,s1]);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment