title: TypeError: Cannot assign to read only property '0' of string
body: <p>I am working on a terminal game. The game field is occupied with fieldCharacters (░) and holes (O)</p>
  <p>The field is generated randomly but I also want to ensure that the pathCharacter (*) always lands in the top left of the field (which is made up of a set amount of arrays)</p>
  <p>To do this I assigned the first index of the first array to pathCharacter (*). See code below:</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>String.prototype.replaceAt = function(index, replacement) {
    return this.substr(0, index) + replacement + this.substr(index + replacement.length);
  }
  
  hat = '^';
  
  hole = 'O';
  
  fieldCharacter = '░';
  
  pathCharacter = '*';
  
  class Field {
    constructor(field) {
      this._field = field;
    }
  
    print() {
      this._field = field.join('\n');
      console.log(this._field.replace(/,/g, ''))
    }
  
    static generateField(height, width) {
      let finalArray = []
      for (let i = 0; i &lt; height; i++) {
        finalArray.push(fieldCharacter.repeat(width));
      }
      for (let i = 0; i &lt; finalArray.length; i++) {
        let randomHoleX = Math.floor(Math.random() * width);
        let randomHoleY = Math.floor(Math.random() * height);
        finalArray[randomHoleY] = finalArray[randomHoleY].replaceAt(randomHoleX, hole);
      }
  
      // what I tried to do
      finalArray[0][0] = pathCharacter;
      return finalArray.join('\n').replace(/,/g, '');
    }
  }
  
  console.log(Field.generateField(5, 10));</code></pre>
  </div>
  </div>
  </p>
  <p>What was outputted: TypeError: Cannot assign to read only property '0' of string '░░O░░░░░░O'</p>
  <p>Example of what I want:</p>
  <pre><code>*░░O░░░░░O
  ░░░░░░░░░░
  ░░░░O░░░░░
  ░░░░░░░░░░
  ░░░O░O░░░░
  </code></pre>