about | help | code help+videos | done | prefs |
Given a string representing a 10-digit phone number of the form "5135290351", return a formatted phone number with parentheses and a hyphen, like this: "(513)529-0351". formatPhone("5135290351") → "(513)529-0351" formatPhone("1234567890") → "(123)456-7890" formatPhone("9999999999") → "(999)999-9999" ...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: 100
Copyright Nick Parlante 2017 - privacy