| about | help | code help+videos | done | prefs |
Many online forms request a user's phone number including the area code and country code. We need to store the phone number in our user database. Unfortunately, people like to enter their phone number in a particular way that doesn't match the way that we'd like to store it. We will let the user enter the phone number how they like and our method will convert it to the way that we'd like to store it. convertPhoneNumberNoCC("10123456789") → "(012) 345-6789" convertPhoneNumberNoCC("13105551212") → "(310) 555-1212" convertPhoneNumberNoCC("88888888888") → "(888) 888-8888" ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 200
Copyright Nick Parlante 2017 - privacy