You Deserved It!


#1


I get the message: 'Your bill is 13.74' (which checks out OK as 20% off) in the console but a message of 'Oops, try again. false' pops up.

Probably something really obvious I know...


  // Create a new method applyStaffDiscount here
    applyStaffDis: function(employee) {
        this.total -= this.total * (employee.discountPercent / 100); 
    },
    
};

cashRegister.scan('eggs',1);
cashRegister.scan('milk',1);
cashRegister.scan('magazine',3);
// Apply your staff discount by passing the 'me' object 
// to applyStaffDiscount
cashRegister.applyStaffDis(me);

// Show the total bill
console.log('Your bill is '+cashRegister.total.toFixed(2));


#2

i haven't seen it with this method, but with other methods inside the cash register you don't have the liberty to name the methods anything you like.

use the method name provided by the exercise


#3

Ah. Didn't even realise I'd abbreviated that. Thanks.


#4