Coding task · JavaScript and TypeScript course · Module 9: Design Patterns and Architecture

Exercise: Genetic Lab System

Implement a genetic laboratory with DNA analysis and creation of new species.

Task

The index.js file has a GeneticLaboratory class. Fill in the blanks: ___BLANK1___ is the regular expression method that checks whether a string matches the pattern (the sequence contains only the letters A, C, G and T) and returns true or false, ___BLANK2___ is the field of the analyzeDNA result that says whether the DNA is valid, and ___BLANK3___ is an expression that returns a new array with all species stored in the Map this.species. analyzeDNA should return { valid, length, gcContent }, synthesize must not create a species from invalid DNA (it returns null then), and getSpeciesDatabase returns an array of species.