Don't understand what I'm doing wrong


#1

https://www.codecademy.com/en/courses/close-the-super-makert/0/3

I'm having exactly the same error but I don't understand what I'm doing wrong... I would like to ask for help too.

var cashRegister = {
    total: 0,
//insert the add method here    
    add: function(itemCost) {
        this.total+= itemCost,}
        
    scan: function (item) {
        switch (item) { 
        case "eggs": this.add(0.98); break;
        case "milk": this.add(1.23); break;
        case "magazine": this.add(4.99); break;
        case "chocolate": this.add(0.45); break;}
        return true;}
        }

//Scan 2 eggs and 3 magazines

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

3/7 SyntaxError: missing } after property list
#2

Heey

You missing a comma after add function

add: function(itemCost) {
this.total+= itemCost;},

I think thats your problem :smiley:


#4

Oh... I didn't see that.

Thanks you!