434,914 Members | 1,100 Online
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,914 IT Pros & Developers. It's quick & easy.

# Prototype Assignment functions...

 P: 1 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: Expand|Select|Wrap|Line Numbers Q("a","blah");   // or a.Q("blah"); // to assign the value of "blah" to the variable a   alert(a); // -----> returns "blah" Example 2: Expand|Select|Wrap|Line Numbers 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 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: Expand|Select|Wrap|Line Numbers a = "blah"; and Expand|Select|Wrap|Line Numbers x = 123 + 456; 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 Jan 24 '08 #1