Part: Short-Term Memory Error


" SyntaxError: Unexpected token " is what I am getting. Seems like it breaks when I create the "Add" function, but I dont see anything wrong with it. I even copied and pasted from the previous tutorial to see if it is a dumb typo.

Thank you for your time.


It's either that I'm blind or stupid, but I don't seem to find a problem on your syntax.

Tried refreshing the browser?:smiley:


I'm so glad it is not me then lol. II will try doing that when I get back on. I'd hate to spend 20 bucks just so I can talk to someone about a bug that might exist. Thanks for thereply. :smile:


Completely deleted all cookies and cache from Chrome, and even tried it on internet explorer. IE tells me that Im missing a '}' and chrome doesn't mention that. Either we're both blind, or there is a problem on their website. Its a shame too, I am at 97% completion.


Welp, apparently there needs to be a comma after the first function. I apologize for assuming it was a website error when the true fault was user error. Thank you for the time you put into trying to figure it out.


Sorry, I couldn't get on in time... :smile:

But congrats on almost being done with the course!


Hey can someone tell me whats wrong with this one?
var cashRegister = {
total: 0,
//insert the add method here
add: function (itemCost) {;

scan: function (item) {
    switch (item) { 
    case "eggs": 

    case "milk": 

    //Add other 2 items here
    case "magazine": 

    case "chocolate": 

    return true;


//Scan 2 eggs and 3 magazines

//Show the total bill

console.log('Your bill is ';

I am getting this message: SyntaxError: Unexpected identifier 'scan'. Expected '}' to end a object literal.


Ok I got it.
Coma after function like this
add: function (itemCost) {;