Booking.com Interview Question

My coding question was to write a function takes an integer and convert it into english words. Exp: Input: 1234 Output: One thousand two hundred thirty four.