I am trying to invoke a class with the code below:
class matchDetails {
constructor(game, kit, player){
this.game = game; // This remains static;
this.kit = color; // This remains static;
this.player = new Array(player);
}
addMatchDetails(){
// return "Coventry";
}
}
ab = new matchDetails(23, 'red', 11);
On the constructor I want this.player to be an array where I can push additional values but I cannot fathom out how to code it.