Essential JavaScript

Apple Baskets Kata

You work in an apple orchard.

Each day you pick several baskets of apples. Each basket contains the same number of apples.

Given the number of baskets and the number of apples per basket, write a function that calculates the total number of apples you picked that day.

Oh, and there's a catch. Sometimes your apples get sucked into an alternate dimension and you end up with negative apples. Keep that in mind.

Code Editor