Created
February 22, 2018 22:18
-
-
Save Smithx10/f5eb7e1d2c3a0d36f31e4e0bb9c29e5a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Teams.prototype.advertiseTeam = function(name) { | |
setInterval(() => { | |
console.log('my name is: ' + name); | |
}, 2000); | |
} | |
Teams.prototype.updateTeam = function(name, newname, captain, available) { | |
assert.string(name, 'name'); | |
assert.optionalString(newname, 'newname'); | |
assert.optionalString(captain, 'captain'); | |
assert.optionalBool(available, 'available'); | |
if (this.getTeam(name)){ | |
if (available) { | |
if (available === true) { | |
this.advertiseTeam(name); | |
} | |
this.teams[name].avaiable = available | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment