| about | help | code help+videos | done | prefs |
prefixNameSuffix
Given a prefix, name, and suffix, return a combined string that starts with the prefix, has the name in the middle separated by a space on each side, and ends with the suffix; however, if the suffix does not start with “of ”, then insert “of ” between the suffix and the name. If the prefix starts with “of “, then remove the “of “. The string returned should never start or end with " " or "of". prefixNameSuffix("Ultimate", "Axe", "Slicing") → "Ultimate Axe of Slicing" prefixNameSuffix("Singing", "Sword", "of Dissonance") → "Singing Sword of Dissonance" prefixNameSuffix("of Dancing", "Boots", "Rhythm") → "Dancing Boots of Rhythm" ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Copyright Nick Parlante 2017 - privacy