Last active
October 30, 2018 00:59
-
-
Save bhaibel/140d174379da9faa65f566e9534c9498 to your computer and use it in GitHub Desktop.
Metrics, Async/Await, and Really Big Hammers -- snippet 1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async function showPrice(item) { | |
const priceWithoutShipping = onSale ? salePrice(item) : item.price; | |
const shippingCost = await shippingRate(item); | |
const totalPrice = priceWithoutShipping + shippingCost; | |
await postMetrics('userCheckoutStep3', totalPrice); | |
showUserTotal(totalPrice); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment