title: remove a carriage return or newline from JavaScript array
body: <p>I am working with an array populated by a text file and parsed with a regex. The first element in my array appears with either \r or \n like so:</p>
  
  <p>"
  This is the first element"</p>
  
  <p>This only occurs on the first element. How would I go about removing this hidden character? I have tried  map with replace('\r', ''), and other iterations of replace with no luck. Thanks for any help. </p>