Functional JavaScript | Common denominator + GCD
\nfractionAddition=(\n    e,\n    // D divides all numbers in [1,...,10]\n    D=2520,\n    // GCD(a,b)\n    $=(a,b)=>b?$(b,a%b):a\n)=>(\n    e=e\n        // spl
```\nfractionAddition=(\n    e,\n    // D divides all numbers in [1,...,10]\n    D=2520,\n    // GCD(a,b)\n    $=(a,b)=>b?$(b,a%b):a\n)=>(\n    e=e\n        // split into individual fractions keeping sign\n        .split(/(?=[-+])/)\n        // further split each fraction into numerator/denominator pair\n        .map(x=>x.split`/`)\n        // bring all fractions to common denominator D\n        // find sum of numerators\n        .reduce((s,[x,y])=>s+D*x/y,0),\n    // find GCD of numerator and denominator\n    $=$(D,e<0?-e:e),\n    // divide both numerator and denominator by GCD\n    // and return simplified fraction\n    e/$+\'/\'+D/$\n)\n```
['JavaScript']