Consecutive characters count in String with JavaScript
Print the given string with the consecutive characters count next to each character, for example, Input: “aabccca” then Expected Output: “a2b1c3a1”. I tried a couple of things and decided to go with a simple for loop as this gives us access to the index with a single iteration, i.e., Linear… Read More »Consecutive characters count in String with JavaScript