Identify selected variable from array

     //Thoose are objects that i have;
     
     
    var shooterPlatform : GameObject;
    var wireFrame : GameObject;
    var passObj : GameObject;
    var bareels : GameObject;
     
     
    var randomObject : Array;
     
     
     
     
    function Awake()
    {
    //--------------------------------------------------------------------------
     
    //At there, Instantiate the object that selected randomly
     
    randomObject = new Array(shooterPlatform, wireFrame, passObj, bareels);
     
    }
     
    function Start () {
     
    var randomSelect = Random.Range(0,(randomObject.length)); //since you want to get a random object every time
     
     
    // At there, if selected variable's name from array list is wireFrame,
    // Applicate this code, if another else like, shooterPlatform, apply another code i wrote.
    // I can't find how to get variable name from array list :(
     
    var position = transform.TransformPoint(Random.Range(16.47816, -1.048871), 0, Random.Range(16.47816, -1.048871));
     
     
    Instantiate(randomObject[randomSelect], position, Quaternion.identity);
     
    }

I don’t know how to read selected variable can any body help ?

Your array contains Objects, not variables, but if you just want the name of the object, you can get that via the name property (yourObject.name).

See the example below. And note that JavaScript arrays are slow and untyped, so I converted it to a .NET array of GameObjects.

var shooterPlatform : GameObject;
var wireFrame : GameObject;
var passObj : GameObject;
var bareels : GameObject;
private var myObjects : GameObject[];

function Awake(){
    myObjects = [shooterPlatform, wireFrame, passObj, bareels];
}

function Start() {
    var randomObject = myObjects[Random.Range(0,myObjects.Length)];
    Debug.Log(randomObject.name);
}