El problema de la granja JavaScript

function animals(chickens, cows, pigs) {
    chickenLegs = chickens * 2;
    cowLegs = cows * 4;
    pigLegs = pigs * 4;
    legTotal = chickenLegs + cowLegs + pigLegs;
    return legTotal;
}