about | help | code help+videos | done | prefs |
Define a function that when passed a String and two characters, returns the String with every occurrence of the first character replaced by the second character. You should not use the built-in methods replace(). replace('hallelujah', 'h', 'p') → 'pallelujap' replace('hallelujah', 'l', 'p') → 'happepujah' replace('ssussussu', 's', '!') → '!!u!!u!!u' ...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: 4 Post-solution available
Copyright Nick Parlante 2017 - privacy