Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var price = 910, // current price
- percentage = 5, // current percentage
- accumulator = 0.1; // or 0.0, or -0.1
- [...Array(8).keys()].forEach(e => { // days till 2017
- price += (price / 100) * (++percentage + percentage * accumulator);
- console.log(`day:${31 - 7 + e} %:${percentage} price:${price}`);
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement