numbers in expanded form algorithm java code example
Example: Write Number in Expanded Form You will be given a number and you will need to return it as a string in Expanded Form. For example:
const expandedForm = n => n.toString()
.split("")
.reverse()
.map( (a, i) => a * Math.pow(10, i))
.filter(a => a > 0)
.reverse()
.join(" + ");