SyntaxFix
Write A Post
Hire A Developer
Questions
You can simply do it like this with an object literal:
function makeGamePlayer(name,totalScore,gamesPlayed) { return { name: name, totalscore: totalScore, gamesPlayed: gamesPlayed }; }