Session
8 new from Text Editing Beginner. About 2 min.
New
Move line/selection up
⌘Cmd+⌃Ctrl+↑
Validation should run first. Move this line above the total.
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