📜  农场问题javascript代码示例

📅  最后修改于: 2022-03-11 15:04:29.350000             🧑  作者: Mango

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