Skip to content

Latest commit

 

History

History
13 lines (8 loc) · 456 Bytes

File metadata and controls

13 lines (8 loc) · 456 Bytes

Ninety Nine Thousand Nine Hundred Ninety Nine (5 kyu)

https://www.codewars.com/kata/ninety-nine-thousand-nine-hundred-ninety-nine

Write a method that takes a number and returns a string of that number in English.

For example:

numberToEnglish(27) // => 'twenty seven'

Your method should be able to handle any number between 0 and 99999. If given numbers outside of that range or non-Integer numbers, the method should return an empty string.