I was working on \'Formatting a number as price\' problem on codewars and thought to have finally solved it with this code:
var numberToPrice = function(number) {