Answers for "success and failure callback functions js"

0

success and failure callback functions js

const {checkInventory} = require('./library.js');

const order = [['sunglasses', 1], ['bags', 2]];

// Write your code below:
const handleSuccess = (resolvedValue) => {
  console.log(resolvedValue);
}

const handleFailure = (rejectedReason) => {
  console.log(rejectedReason);
}

checkInventory(order).then(handleSuccess, handleFailure);
Posted by: Guest on September-21-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language