I am trying to concatenate the result returned by a function to a simple string, both are declared inside the same object. Example:
var hello = {
how: function(){
return ' are you';
},
ans: 'how',
answer: 'how' + this.how()
};
console.log(hello.how()); //works
console.log(hello.ans); //works
console.log(hello.answer); //doesnt work
Here is the Fiddle
Thanks for your help!