Ok, practically using a string or strings it is possible to declare:
1) Object fields:
var obj = { “fi” : 42 };
obg[‘fi2’] = 43;
2) Functions:
var sum3 = new Function(“arg1”, “arg2”, “return arg1 + arg2;”);
3) Anything, if you pass the string to eval and “use strict” is not on:
var code = "var obj = { 'fie' : 42, 'sum' : function(a, b) { return a+b; } }";
eval(code);
alert(obj.fie);
alert(obj.sum(2, 2));
solved JavaScript declarations using strings