PikachuPlays
PikachuPlays

Reputation: 49

Is there anyway to Get the Value of a Variable that is a Value of a different Variable

Basically I am making a pokemon style game and When a move gets Assigned I wanted to know if there is anyway to take the Value of a string variable. And get the value of the variable that has the same Name as the string. Which sounds complicated but hopefully this makes it Make Sense.

var Move = 'Tackle';
var Tackle = Value Here;

I want to be able to take whatever the Variable Move is Equal to and get the Value that is labeled after it.

Upvotes: 0

Views: 20

Answers (0)

Related Questions