This is probably too simple, but the object syntax is getting to me.
I have a simple function, that returns a string perfectly fit for using as arguments on an object, so:
function createString() {
// yadda yadda yadda
return myPerfectstring;
}
and then there’s this object, which should take myPerfectstring as a value like this:
new myPlayer({
this: "#that",
css: "#theOther"
},
// insert myPerfectstring here
// if I log it to the console and copy-paste here, everything works wonders
, {
other: "nana",
things: "yeah",
around: "yeahyeah"
});
i know i can’t just throw the function there, neither store it in a variable and insert, so, how do i go about entering that string as if it were really part of the object?
you can’t do this? I’m having trouble determing how you are trying use the return value within the constructor. as it’s own property?