you’re on your way 4
173
asynchronous applications
Test drive
Even though there is plenty of work left to do, go ahead and take the coffee
maker for a test drive. Be sure you’ve added the sendRequest(), getSize(),
getBeverage(), and orderCoffee() functions to coffee.js, and then
load coffee.html in your web browser.
Enter in an order, and see what happens. Then, enter in another order... are
both coffee makers being used?
Jim’s large mocha
is brewing on the
rst coffee maker.
Bob’s order is
brewing over
on the seecond
coffee maker.
Notice that once an order is placed, the person’s name and
order details stay lled in. Could this cause problems? What
do you think we should do to avoid any confusion?
brain
power