about | help | code help+videos | done | prefs |
Given a string containing a mix of letters and digits, return a sum of the digits. Tip: Character.isDigit('5') will return true because 5 is a digit. addDigits("ab1c2") → 3 addDigits("45") → 9 addDigits("xxx8x9x10") → 18 ...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: 250
Copyright Nick Parlante 2017 - privacy