0
Hours
0
Minutes
0
Seconds

Implement a Currency Formatting Utility | JavaScript Interview Question

@Yomesh Gupta
538

You have to implement a simple currency formatting utility.

function format(n) {
    ....
}

const responseOne = format(123456789);
// 123,456,789

const responseTwo = format(123);
// 123

Please take care of edge cases too.

Loading IDE...