Check out example codes for "phoneword converter". It will help you in understanding the concepts better.

Code Example 1

Enter a phone word: warbler
The number is 9272537.

Enter a phone word: GOOD4U2
The number is 4663482.

Enter a phone word: OMG
Your phone word is not long enough for a phone number.

Enter a phone word: GREAT DEALS
The number is 4732833.

Learn ReactJs, React Native from akashmittal.com