Skip to content

Chapter 13 Robot game solution (p. 583 in pdf book) #20

Open
@tygamchenry

Description

@tygamchenry

Hello,

Why is a function needed under the unlock function? The following doesn't work... why doesn't it?

Game.prototype.unlock = function() {
if (this.level === 42) {
console.log(this.name + " is blasting you with laser beams.");
}
}

...

robby.unlock();
rosie.unlock();

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions