You are viewing a single comment's thread. Return to all comments →
JavaScript Soultion
function bonAppetit(bill, k, b) { // Write your code here bill.splice(k,1) const amount =( bill.reduce((acc,num)=>acc+=num,0) )/2 const check = b - amount if(check) console.log(check) else console.log('Bon Appetit')
}
Seems like cookies are disabled on this browser, please enable them to open this website
Bill Division
You are viewing a single comment's thread. Return to all comments →
JavaScript Soultion
}