Skip to content

Project #34 of Codecademy's Full Stack Engineer Career Path

License

Notifications You must be signed in to change notification settings

AntonV0/mysterious-organism

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

Mysterious Organism

Project #34 from Codecademy's Full Stack Engineer Career Path

By Anton Vlasenko (AntonV0)

Project Outline

The Mysterious Organism named P. aequor is a fictional creature that is comprised of only 15 DNA bases. 4 base types (A, T, C, and G) make up a DNA strand, and each P. aequor's strand is randomised.

A factory function is used here to return the specimen number and its DNA strand. The factory function contains three methods; one mutates a single base of the DNA strand, another compares the DNA similarity of two P. aequor specimens, and the final method calculates whether the specimen is likely to survive.

A while loop is used to create 30 instances of specimens likely to survive, storing each DNA strand in an array.

What I Learned

  • Using factory functions to create multiple objects/instances
  • Methods that mutate, compare, and filter array items
  • The parseFloat() function and toFixed() method
  • While loops

Please note that in each project, the first commit is always the starter code provided by Codecademy.

Releases

No releases published

Packages

No packages published