Help me resolve the below code showing syntax error. I know there is definitely some problem. How to write the below checkInventory order with the help of arrow functions.
const {checkInventory} = require('./library.js');
const order = [['sunglasses', 0], ['bags', 2]];
const handleSuccess = (resolvedValue) => {
console.log(resolvedValue);
};
const handleFailure = (rejectReason) => {
console.log(rejectReason);
};
checkInventory(order)=new Promise(resolvedValue, rejectReason){
if(resolvedValue)
return handleSuccess;
else
return handleFailure;
};