I am trying this:
return {
configs: app.config
}
But it does not seem to work. Is there another way to return an anonymous object with the one field "configs" ?
function someFunc() {
var retVal = {
configs: app.config
};
return retVal;
}
Here is another idea:
var someFunc2 = function() {
var app = {};
app.config = 1;
return { configs: app.config };
};
someFunc2();
// Object {configs: 1}
x = function() { y = { config: 0}; return { configs: y.config}; } ; x();
returnstatement outside of a function. There is nowhere to "return" to.