-
-
Save shahab570/b2dfb2da0ccc5a9d3c9d209db12eb8bc 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
function Player(firstName, lastName) { | |
this.firstName = firstName; | |
this.lastName = lastName; | |
} | |
var messi = new Player("Leonel", "messi"); | |
var Pique = new Player("Gerard", "Pique"); | |
var Team = { | |
Name: "Barcelona", | |
players: [], | |
}; | |
Team.players.push(messi); | |
Team.players.push(Pique); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment