Ad
  • Custom User Avatar

    If you were trying to use the Javascript method .concat() like a was, here's where I was tripping up with it

    concat does not alter the invoking strings, but returns a new one.

    So you can't just iterate over the names array and concat the names to an empty string without reassigning the variable every time

  • Custom User Avatar

    I initially was using a forEach loop with a regular for loop inside of it and it wasn't working. Not sure why I went that direction with it, but it didn't work. I would love to know why it didn't work though! This solution does work.