Skip to content

Instantly share code, notes, and snippets.

@chetanraj
Created August 15, 2021 12:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chetanraj/43cf311b8ba99220deda2f0705cbd86c to your computer and use it in GitHub Desktop.
Save chetanraj/43cf311b8ba99220deda2f0705cbd86c to your computer and use it in GitHub Desktop.
beingAsync
const beingAsync = async () => {
const book = await getBookByName('Art of War');
const { stock } = await checkIfBookExists(book.ISBN);
if (stock > 0) {
const response = getTheBookPrice(book.ISBN);
console.log(`Book price is $${response.offers.booksrun.new.price}!`);
} else {
console.log('Book not found!');
}
};
beingAsync();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment