Skip to content

Instantly share code, notes, and snippets.

@Penderis
Created January 17, 2016 11:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Penderis/feedaef4d4d3534af37b to your computer and use it in GitHub Desktop.
Save Penderis/feedaef4d4d3534af37b to your computer and use it in GitHub Desktop.
Calculate saving over period at 5% increase per month
var Interest = 1.05;
var Base = 200;
var Total = 0;
var Count = 12;
for (i = 1;i< Count;i++){
console.log("Base: "+Base*Interest)
console.log("Total: "+Total)
Total += Base;
Base = Base*Interest;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment