次のコードがありますが、エラーが発生していますUncaught TypeError: Object #<addThis> has no method 'returnValue' (anonymous function)
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());