Below is a farmAnimals object with many animals and number of legs that animal have. Given a particular animal, find the total number of legs of that animal in farm.
let farmAnimal = {
chicken: { legs: 2, count: 2 },
cow: { legs: 4, count: 1 },
pig: { legs: 4, count: 2 },
ostrich: { legs: 2, count: 4 },
zebra: { legs: 4, count: 3 },
}
let animal = 'chicken';
let legCount = //expression
console.log(legCount);