Coding task · JavaScript and TypeScript course · Module 1: JavaScript Basics
Practice: Searching the DNA Database
Use loops to search the dinosaur DNA database. Iterate through sample collections, looking for specific species.
Task
Store the species names of DNA samples in an array called dnaSamples, e.g. ['Velociraptor', 'Triceratops', 'Velociraptor']. Go through the array with a loop, count the 'Velociraptor' samples and display the result in the console.