<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Money Growing.</title>
</head>
<body>
<script type="text/javascript">
var tax = 0.05;
var money = 1000;
var year; for(year=1; money<1000; year++)
{
money += money*tax;
alert(money);
}
year--;
document.write(year+" years , you got "+money);
</script>
</body>
</html>