Makin' Money
![Makin' Money](/content/images/size/w2000/2016/05/keep-calm-and-make-it-rain-1500-500-white-blue.jpg)
Without using Number.prototype.toLocaleString
, write a function that takes an integer as an argument and formats it to look like a currency amount, including a dollar sign, commas, and a decimal (the last two digits will be the cents). E.g.:
formatMoney(123456789) // returns $1,234,567.89
formatMoney(789) // returns $7.89
formatMoney(89) // returns $0.89
formatMoney(9) // returns $0.09