You are viewing a single comment's thread. Return to all comments →
javascript
function bonAppetit(bill, k, b) { let totalBill = 0 let partialBill = 0 bill.forEach(value =>{ totalBill += value }) partialBill = (totalBill - bill[k])/2 if (b- partialBill == 0 ){ console.log("Bon Appetit") } else{ console.log(b- partialBill) } }
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