.
추가function thousandSeparator(n: number): string {
const strN = String(n)
const splitted = [...strN]
const reversed = splitted.toReversed()
const originLen = reversed.length
const includeDot = reversed.reduce((acc, cur, idx) => {
const curArr = [cur]
const isThousand = (idx + 1) % 3 === 0
if((idx !== originLen - 1) && isThousand) curArr.push('.')
return [...acc, ...curArr]
}, [])
return includeDot.reverse().join('')
};