Coding task · JavaScript and TypeScript course · Module 9: Design Patterns and Architecture
Exercise: Dinosaur Registry
Create a dinosaur registry with unique ids, updates without mutation and search by criteria.
Task
The index.js file has a DinosaurRegistry class with register, update and find methods. Fill in the blanks: ___BLANK1___ copies all fields of the old record into the new object (as in the immutability lesson), ___BLANK2___ is the array method that keeps only the matching records, and ___BLANK3___ is the array method that returns true only when the record matches every criterion. update should return a new object and leave the old one unchanged, and find({ zone: 'A', species: 'T-Rex' }) only the records that match both conditions.