The booking total prints as a promise

Follow a promised value through a price helper and its caller.

your task

Fix the calculation and its caller. Keep bookingTotal async. Each case must print “total: ” followed by the numeric price for all hours.

The starter prints total: [object Promise] for both bookings. readRate() supplies the hourly rate later. Follow that value through bookingTotal and the line that prints the total.

Starter code
or press Ctrl EnterNot run yet

cases

Not run yet3 hours at 40

Expected output

1total: 120
See the input and the code for this case
const hours = 3;
function readRate() { return Promise.resolve(40); }
Not run yet2 hours at 12.5

Expected output

1total: 25
See the input and the code for this case
const hours = 2;
function readRate() { return Promise.resolve(12.5); }