title: JavaScript: replace string inside array
body: <p>Maybe I'm making a very stupid mistake but here it goes. I want to take <code>[ 'hr' ]</code> and turn it into <code>[ '* * *' ]</code> So I did this:</p>
  
  <pre><code>var hr = jsonml[i]
  
  console.log(hr)
  // outputs: [ 'hr' ]
  hr.replace(/hr/g, '* * *')
  </code></pre>
  
  <p>But I get this error:</p>
  
  <blockquote>
    <p>TypeError: Object hr has no method 'replace'</p>
  </blockquote>
  
  <p>What am I doing wrong?</p>