Please help with the objects in the array

Hi I need help with this script.
When I give the object into the field I get this error:
Assets/Script/objArray.js(11,31): BCE0019: ‘name’ is not a member of ‘Object’.
Assets/Script/objArray.js(12,21): BCE0019: ‘transform’ is not a member of ‘Object’.

Sorry for my English

function Start(){
	var gameObject = GameObject.Find("root");
	var children : Array = new Array();
	for (var child : Transform in gameObject.transform) {
		children.Add(child);
		Debug.Log(child.name); //WORKS
		child.transform.position = Vector3(0, 0, 0); //WORKS
	}
	Debug.Log(children[0].name); // NOT WORKING
	children[0].transform.position = Vector3(0, 0, 0); //NOT WORKING
}

You shouldn’t use the JS Array class; use built-in arrays, or generic Lists if the array size should be dynamic.

–Eric

thank you