Why do I get the error message Object has no method in Javascript?
<p>I have the following code however am getting the error <code>Uncaught TypeError: Object #&lt;addThis&gt; has no method 'returnValue' (anonymous function)</code></p>

<pre><code>function addThis() {
    this.value1 = 1;
    this.value2 = 2;

    var returnValue = function () {
        return (this.value1 + this.value2);
    }
}

//Instantiate object and write response
var simpleObject = new addThis();
document.write(simpleObject.returnValue());
</code></pre>
