Practice · Text Editing Beginner
Drill this lesson at your own pace. Practice doesn't change your review schedule.
Keys
Validation should run first. Move this line above the total.
one chord, three keys
checkout.js — shopgoal
shop.jscheckout.jscolors.js
1async function checkout(cart) {
2 const total = sum(cart.items);
3 validate(cart);
4 await charge(cart.card, total);
5 await sendReceipt(cart.email);
6 return total;
7}
Line 3, Column 6Spaces: 2 · JavaScript
or press Enter