Then check if it's zero (because if it is, we can just return "zero").

Next, let's make sure we've defined the building blocks that will make up the final string. They include:

  • units like one, thirteen, etc.
  • tens values like twenty, thirty, etc.
  • scales like thousand, and million

Now we account for the various scales. Most of the scaling levels come up every 3 digits. Using this code block, we can get every 3 digits as chunks.

Step Three
TEXT
OUTPUT
Results will appear here.