Created
August 15, 2021 12:37
-
-
Save chetanraj/57771850cc167e7c2bd7807b6068425d to your computer and use it in GitHub Desktop.
getBookByNamePromise
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
getBookByName('Art of War').then((book) => { | |
if (book) { | |
checkIfBookExists(book.ISBN).then((data) => { | |
console.log(data.stock > 0); | |
}); | |
} else { | |
console.log('Book not found!'); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment