Advertisement

06.08.2008 at 10:32AM PDT, ID: 23467414
[x]
Attachment Details

Is there a JavaScript equivalent to PHP's $$ (double dollar sign)

Asked by Hube02 in JavaScript

Tags: Javascript

In php you can do something like:

$this = "that";
$$this = "the other thing"; // can also be written ${$this} = "the other thing";

and what you end up with is a variable name $that with the value "the other thing" just as if you had done:

$that = "the other thing";

Is there something similar in JavaScript? What I need to do is to create a variable that has the name of the value of another variable.Start Free Trial
[+][-]06.08.2008 at 11:33AM PDT, ID: 21739130

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: JavaScript
Tags: Javascript
Sign Up Now!
Solution Provided By: Kravimir
Participating Experts: 1
Solution Grade: A
 
 
[+][-]06.08.2008 at 02:40PM PDT, ID: 21739712

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628