Maina
Maina

Reputation: 1

How to create a program in JavaScript which converts numbers of any length to its word representation?

I have to make a program to convert large numbers to its corresponding word representation. But I can only use 'crore' (see Indian Numbering System) as the largest value representation. i.e i cannot use phrases like million, billion, trillion and do on. For example 12346435689 should be "One thousand two hundred thirty four crore sixty four lakh thirty five thousand six hundred eighty nine"

Upvotes: 0

Views: 35

Answers (1)

Paulux
Paulux

Reputation: 26

There is npm package that does exactly what you are looking for https://www.npmjs.com/package/number-to-words

If you don't mind using a npm package.

Upvotes: 0

Related Questions