Skip to content

Instantly share code, notes, and snippets.

@chetanraj
Created August 14, 2021 15:03
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/5252df03f6c082d8e9cbdcc0140acc5f to your computer and use it in GitHub Desktop.
Save chetanraj/5252df03f6c082d8e9cbdcc0140acc5f to your computer and use it in GitHub Desktop.
getBookByName
// get books
const getBookByName = (name) => {
return new Promise((resolve, reject) => {
setTimeout(() => {
resolve({ name: 'Art of War', author: 'Sun Tsu', ISBN: 9780140439199 });
}, 500);
});
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment