Using Reduce Method Javascript Substring Negative Space