I'm in the process of simplifying my code and I want to find out how feasible it is to do the following...
Example 1:
Example 2:
Anybody have any idea how to go about creating a function that could do that?
Please don't question why I want to do this, I want to know if it's possible and how... and please don't provide me with answers like:
and
Just humor me... this is something I want to try, so I want to know how possible it is to do this sort of thing...
Thanks...
-- Fibonacci Jones
Example 1:
Code:
Q("a","blah");
// or a.Q("blah");
// to assign the value of "blah" to the variable a
alert(a); // -----> returns "blah"
Code:
Q("x",123 + 456);
// or x.Q(123+456)
// to assign the value of the sum of 123 + 456 to the variable x
alert(x); // -----> returns 579
Please don't question why I want to do this, I want to know if it's possible and how... and please don't provide me with answers like:
Code:
a = "blah";
Code:
x = 123 + 456;
Thanks...
-- Fibonacci Jones
Comment