Code: Select all
function getSpecimenSummary(specimen) {
const dnaSeq = specimen.dnaSeq;
const evolution = simulateEvolution(specimen) //this function changes specimen.dnaSeq
return `DNA sequence: ${dnaSeq} Evolution prognosis: ${evolution} generations survived`
//this returns the value of specimen.dnaSeq after it changes; I want it to return the initial value.
}