I want to know if it's possible to do something like this:
var myObject = {
first: "Hello" + otherObject.second() + someVariable;
}
Then call it and display in html:
html += myObject.first() or myObject.first
I want it to display all values of "someVariable" and "otherObject.second()". Currently it display something like:
function () {
return 2 * 2
}
but I want it to display "4" as a string/number so the result would be something like "Hello4". I hope you understand my question :) If thats not possible or it's a bad idea overall to do that, then let me know too and I will figure out something else.