Object #<person> has no method 'carName'
<p>So I'm getting this error; Object # has no method 'carName'
But I clearly do.
<a href="http://pastebin.com/SaTedrce" rel="nofollow">Pastebin</a></p>

<p>I've also tried referencing the car's "model" property with</p>

<pre><code>player.car.model
</code></pre>

<p>but that doesn't work, I get a type error. Any ideas? Do you need more info?</p>

<pre><code>function person(name, car) {
    this.name = name;
    this.car = car;
    function carName() {
        return car.model;
    }
}

var player = new person("Name", mustang);
var bot = new person("Bot", mustang);
var bot2 = new person("Bot 2", mustang);

function makeCar(company, model, maxMPH, tireSize, zeroToSixty) {
    this.company = company;
    this.model = model;
    this.maxMPH = maxMPH;
    this.tireSize = tireSize;
    this.zeroToSixty = zeroToSixty;
}

var mustang = new makeCar("Ford", "Mustang GT", 105, 22, 8);
var nissan = new makeCar("Nissan", "Nissan 360z", 100, 19, 6);
var toyota = new makeCar("Toyota", "Toyota brandname", 95, 21, 7);
</code></pre>
