The the custom JavaScript object player is defined as below.
function player () {
this.name = '';
this.serving = false;
this.gamepoint = 0;
this.sets = new Array();
this.toString = function() {
return (this.name + ": " + (this.serving ? 'Serving' : 'Facing') + "\n" + this.sets + "\n" + this.gamepoint);
}
}
The sets member variable is an array.
Del.icio.us
Digg
Reddit
Facebook
StumbleUpon
