Mysterious Organism Challenge Project (JavaScript) Mutate Function

Hi all! I am working on the mysterious organism challenge project and just finished part 4 (creating a mutate function).

The code seems to work, but would like some feedback or suggestions on how to improve this code section or make it simpler :smiley: Thanks!

// Returns a random DNA base
const returnRandBase = () => {
  const dnaBases = ['A', 'T', 'C', 'G']
  return dnaBases[Math.floor(Math.random() * 4)] 
}

// Returns a random single stand of DNA containing 15 bases
const mockUpStrand = () => {
  const newStrand = []
  for (let i = 0; i < 15; i++) {
    newStrand.push(returnRandBase())
  }
  return newStrand
}

const pAequorFactory = (num, arr) => {
  return {
    specimenNum: num,
    dna: arr,
    mutate() {
      let randIndex = Math.floor(Math.random() * this.dna.length);
      let base = this.dna[randIndex];
      let randBase = returnRandBase();

      if (base === randBase) {
        let flag = false;
        console.log(`Same. Base: ${base}`)
        let newBase;
        do {
          newBase = returnRandBase();
          if (newBase !== base) {
            flag = true;
          }
        } while (false);
        base = newBase;
        console.log(`Changed. Now new base: ${base}`);
      } else {
        console.log(`Not the same. base: ${base}, randBase: ${randBase}`);
        base = randBase;
        console.log(`new base: ${base}, randBase: ${randBase}`);
      }
    }
  
  }
};