Skip to content

Instantly share code, notes, and snippets.

@mikekeke
Last active September 26, 2023 07:50
Show Gist options
  • Save mikekeke/84f121fda50a6d002dd4a5a48b6fb7ef to your computer and use it in GitHub Desktop.
Save mikekeke/84f121fda50a6d002dd4a5a48b6fb7ef to your computer and use it in GitHub Desktop.
calculations
const base = 1200;
const total = 7100 + 1250 + 400 + 70.183;
const MihaR = base;
const Costya = base - 400;
const LyohaM = base - 70.183;
const Antoha = base;
const DimanK = base - 1250;
const DimanV = base;
const Me = base;
const sum = [MihaR, Costya, LyohaM, Antoha, DimanK, DimanV, Me].reduce((a,b) => a + b, 0);
console.log("tot", total) // 5480
console.log("sum", sum) // 5480
const my = total - sum;
console.log("my", my) // 3340.183000000001
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment