Building a Cash Register, return true within switch? what is it for?


Please, I would like to know why the "switch" within the "scan method" has "return true". What is this for? Because the code can run without it.

Thank you

var cashRegister = {
    lastTransactionAmount: 0,
    add: function(itemCost){ += (itemCost || 0);
        this.lastTransactionAmount = itemCost;
    scan: function(item,quantity){
        switch (item){
        case "eggs": this.add(0.98 * quantity); break;
        case "milk": this.add(1.23 * quantity); break;
        case "magazine": this.add(4.99 * quantity); break;
        case "chocolate": this.add(0.45 * quantity); break;
        return true;
    voidLastTransaction : function(){ -= this.lastTransactionAmount;
        this.lastTransactionAmount = 0;
    // Create a new method applyStaffDiscount here
    applyStaffDiscount: function(employee){ -= employee.discountPercent*;}


In this exercise we don't make use of the statement, so it is rather superfluous. Why the author chose to include it is beyond me. The only real purpose it has served thus far is to continually raise this question.


Too many words for a haiku, but definitely poetic gold.