Maybe I'm missing something, but doesn't passing an initialValue after your reduce's callback mean that what you're calling str1 (in the callback) is actually the accumulator? For the sake of verbosity, I'd name it accordingly. Better yet, I'd get rid of the initialValue altogether.
Please correct me if I'm wrong.
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.