Possible to use an array value as the name of a variable?

I am trying to name a variable. I want to use the value of an array location as the name. The reason is that I am loading data at runtime and it is stored in an array. For example, the contents of myfile.txt are:

apple,dog,tree

I would like to name a variable to whatever information is in the first location of the array, and then another variable using the second location.

Is this possible?

Javascript only please. I can barely script with that, let alone learning another language.

Thanks in advance.

say your array is:

var myArr:String[] = ["apple","dog","tree"];

then to access each of those you do:

print(myArr[0]); //which will print apple

print(myArr[1]); //which will print dog

print(myArr[2]); //which will print tree

Are you talking about a hashtable?

import System.Collections.Generic;

function Start () {
    var things = new Dictionary.<String, int>();
    things["apple"] = 0;
    things["dog"] = 1;
    things["tree"] = 2;
    Debug.Log (things["tree"]);
}