0
Hours
0
Minutes
0
Seconds
You need Login/Signup to run/submit the code.

Implement a Currency Formatting Utility | JavaScript Interview Question

@Yomesh Gupta
559

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...