Skip to content

Latest commit

 

History

History
9 lines (8 loc) · 1.04 KB

45-ninety-nine-thousand-nine-hundred-ninety-nine.md

File metadata and controls

9 lines (8 loc) · 1.04 KB

Problem:

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

number_to_english(27) # => 'twenty seven'
number_to_english(27) # => 'twenty seven'
number_to_english(27) # => 'twenty seven'
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.

Solution