Mysterious Organism Mutate method

Hi! I’m stuck on #4 of this exercise, if anyone can please advise.
I get an undefined return when I call the mutate method on my mockup dna strand.
I’m getting a random index in my array that I want to replace, and if the element at that index isn’t equal to a randomly called base, it should mutate to that base.
Any ideas?

// Returns a random DNA base
const returnRandBase = (x = null) => {
  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++) {
  return newStrand

const pAequorFactory = (number, array) => {
  return {
    specimenNum: number,
		dna: array,
    mutate () {
      randIndex = Math.floor(Math.random*15)
      randBase = returnRandBase()
      if (this.dna[randIndex] != randBase ){
        this.dna[randIndex] = randBase
let mockup = pAequorFactory(4, mockUpStrand())

first you have to get the random base from dna property then you have to find the different base by calling returnRandBase function.
if returnRandBase function returns the same base, we should use loop to iterate over and over until we get the different base. Once you have it, assign it to dna random base and return new the dna. Here is the code!

 mutate() {
    let randIndex = Math.floor(Math.random() * 15)
    let randBase;
    do {
        randBase = returnRandBase();
        if (this.dna[randIndex] !== randBase) {
            this.dna[randIndex] = randBase;
    } while (true);
    return this.dna;}