Skip to content

Instantly share code, notes, and snippets.

@chetanraj
Created August 14, 2021 15:05
Show Gist options
  • Save chetanraj/b30a13048289d676a81a118fc4b701f7 to your computer and use it in GitHub Desktop.
Save chetanraj/b30a13048289d676a81a118fc4b701f7 to your computer and use it in GitHub Desktop.
getBookByNamePromise
getBookByName('Art of War').then((book) => {
if (book) {
console.log('Found the book!');
} else {
console.log('Book not found!');
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment