Home >Web Front-end >JS Tutorial >How to convert number type into money format with no commas in JS_javascript skills

How to convert number type into money format with no commas in JS_javascript skills

WBOY
WBOYOriginal
2016-05-16 17:02:071229browse

3345687687876789123

is converted into: xxx,xxx,xxx

Copy code The code is as follows:



The results of the new energy test are:
Copy code The code is as follows:

Total time consuming for method one: 14 ms
Total time consuming for method two: 9 ms
Total time spent on method three: 174 ms
Total time spent on method four: 34 ms
Total time spent on method five: 39 ms
Total time spent on method six: 7 ms
Total time spent on method seven: 9 ms
Total time consumption of method 8: 30 ms
Total time consumption of method 9: 14 ms
Total time consumption of method 10: 4 ms
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn