#challenge



💻 Compounding Letters | #easy



Create a function that takes a string and returns a new string with each new character accumulating by +1. Separate each set with a dash.



Capitalize the first letter of each set.



Examples:



Accum("abcd") ➞ "A-Bb-Ccc-Dddd"

Accum("RqaEzty") ➞ "R-Qq-Aaa-Eeee-Zzzzz-Tttttt-Yyyyyyy"

Accum("cwAt") ➞ "C-Ww-Aaa-Tttt"



🏆 Leave your solutions in the comments. The solution will be posted below in a couple of hours 👇



#interview