When a bank- or lottery check is printed, the amount is usually printed with both numbers and letters. Here I've written the algorithm that converts an amount to the alphabetical representation.
npm install
npm run start
npm run test
npm run test:coverage
Open the terminal and use the function like down below:
converter(2); // two
converter(22); // twenty two
converter(222); // two hundred twenty two
converter(2222); // tho thousand two hundred twenty two