Challenge Project: Mysterious Organism (Javascript) Mutate()

hi, everyone. In the Challenge Project: Mysterious Organism , I don’t understand what this part tells me to do, can someone explain it to me. Thanks!!

  • mutate will return object’s DNA, so it means return an array of 15 DNA bases, right?
  • if i choose random base in ('A','T','C', or 'G'), for example A is the first DNA base then 14 DNA bases cannot be 'A' again, right?
  • And the new DNA based on an array DNA base made from mockUpStrand() including first base , right? or first base just random and 14 bases based on an array DNA base made from mockUpStrand()?

Yes, that’s right

No. If your first base is A and the randomly selected base index is 0 (the first one), then just the first base may not be A again. The other 14 bases stay the same. For example:

  let currentDNA = 'ATCGCCCGGGAAAAT'
  let newDNA =  'TTCGCCCGGGAAAAT'

I don’t understand your last question.

PS: Please always include a link to the lesson.

2 Likes

Thank you, I understood. My last question has already been answered by you.

1 Like