Skip to content

Latest commit

 

History

History
executable file
·
6 lines (4 loc) · 439 Bytes

README.md

File metadata and controls

executable file
·
6 lines (4 loc) · 439 Bytes

recursion-practice

Create a function using recursion called numToText which takes a string and returns a new string with all numeric numbers from the input string converted to their corresponding text words. You can assume that the numbers in the string are single digit numbers.

Extra Credit: Have the function handle numbers of any digit size.

Ex: numToText("I have 5 dogs and 6 ponies"); // returns "I have five dogs and six ponies