Pausing all audios HTML and JavaScript

I’m trying to create a button that, when it is clicked, it stops all the other audios from playing and plays another specific sound.

I created an array with the names of all the audios’ ids (there are just 2 right now but I’ll add others later) and i tried to iterate through it pausing all the audios (except rapstar, which needs to be played) but they keep playing.

JavaScript:

document.addEventListener('DOMContentLoaded', function() {

    const audios = ['gotg','rapstar'];

    document.getElementById('polo-g-play').addEventListener('click', function() {
      for (let i = 0, k = audios.lenght; i < k; i++) {
        if (audios[i] != 'rapstar') {
          document.getElementById(audios[i]).pause();
        }
      }
      let audio = document.getElementById('rapstar');
      if (audio.paused)
      {
        audio.play();
      }
      else
      {
        audio.pause();
      }
    }); 
  });

The part after the for loop deals with playing the audio if it is paused or pausing it if it is already playing (just like the classic spotify play button).

The HTML of the 2 audios are these:

<audio id="rapstar" src="audio/rapstar.mp3">
    No Music Here
</audio>
<audio id="gotg" src="audio/getyourlove.mp3">
    No Music Here 
</audio>