Balloon Kata

Use JavaScript to: parse strings and convert them to numbers; loop through an array; compare the result of calculations.

Order up

You want to have a variety of balloons for a party. You can only order balloons in sets of 3.

This order was placed:

4 sets of red, 3 sets of blue, and 3 sets of yellow.

The price for each set of balloons is:

R4 for red, R5 for blue, and R5.50 for yellow.

Use these strings as your starting point.

Write functions that answer the following questions. If you’re familiar with mocha, use TDD.

Pop, pop!

During the party

5 red balloons, 1 blue balloon, and 3 yellow balloons popped

Other parties:

Remember that your functions should also work for other parties.