Javascript – How do I count the occurrences of a string within multiple arrays that are part of an object?
I have an exercise that requires me to use a for loop to iterate through the object 'tutorPetTypes' and calculate the collective total number of cats owned by the tutors. Here's my current code. It runs but results in totalCats…