Adding Array Items Javascript Substring Negative Correlation