How to make this manual and automatic? : <p>I have this code, and it basically changes the text and image on the user's screen. I would like to do this manually with the click event. but I can't, can anyone help me? please</p>

<pre><code>let i = 0;
let img = 0;
let images = [
  '...',
  '...',
  '...',
  '...',
  '...',
  '...'
];

let textArrayImg = [
  "Moda",
  "Beleza",
  "Comportamento",
  "Decoração",
  "Entretenimento",
  "Bem-Estar"
];


let textImg = document.querySelector('.textImg');
let btnPrev = document.querySelector('.btnPrev');
let btnNext = document.querySelector('.btnNext');



function changeImg(){
  document.querySelector('.slide').src = images[img];
  textImg.textContent = textArrayImg[i];

  if(img &lt; textArrayImg.length - 1){
    img++;
  }else {
    img = 0;
  }

  if(i &lt; images.length - 1){
    i++;
  }else {
    i = 0;
  }

  setTimeout(changeImg, 3000);
}

changeImg();



btnPrev.addEventListener('click', () =&gt; {

});

btnNext.addEventListener('click', () =&gt; {

});
</code></pre>

<p>I already tried some ways but I would like to do it this way because it makes it easier for me</p>
