# Learning OOP

**URL:** https://forum.kirupa.com/t/learning-oop/75957
**Category:** random
**Created:** [January 13, 2005, 3:59pm UTC](https://forum.kirupa.com/t/learning-oop/75957 "2005-01-13T15:59:42Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![dgrhm](https://avatars.discourse-cdn.com/v4/letter/d/65b543/32.png) [@dgrhm](https://forum.kirupa.com/u/dgrhm)
#### Post date: [January 13, 2005, 3:59pm UTC](https://forum.kirupa.com/t/learning-oop/75957/1 "2005-01-13T15:59:42Z")

</div>

Hey all,  
The fog is starting to lift in regard to OOP for me, but its still foggy. What I’m trying to figure out now is how do I go from creating an object to making it functional?

For example, say I want to create a generic football player. I’d use a code like this:

function Player(name, position) {  
this.name = name;  
this.position = position;

//objects conatined in Player will hold  
//their own properties

this.experience = {};  
this.running = {};  
this.catching = {};  
this.toughness = {};  
this.defense = {};  
}

My sample player name array:

name = new Array(“Jones”, “Smith”, “Hakim”, “Jackson”, “Manning”);

How would I go from this to randomly creating and generating players?

I’ve been unable to get my code to work. Any suggestions? I know I’m just not understanding something. Thanks.
