What were you expecting to see? :) I'm not sure what you're trying to do.
x is an array and all you did when you did x.name, you simply set up a property called name for the array object. The name property itself is not added into the array. You can see this in firebug:

The array object has a property called name, but the value of that property is not added to the array itself.
What you want to do is something like this:
var x = {
array: [1, 2, 3, 4],
name: "myArray"
};
Now you have an object called x that has two properties. The array property refers to an array, and the name property refers to the name. x.array will give you the array, and x.name will give you the name.
EDIT
This is in response to your comments. While it is true that arrays can be enriched with properties, think about what it means when you have to serialize that object. What exactly do you want to see when you serialize x? If x is already the array [1, 2, 3, 4], how would you represent it in JSON? You could represent it as:
{ 0: 1,
1: 2,
2: 3,
3: 4,
name: "myArray"
};
But what you now have is no longer an array. Also, the array object itself has a bunch of native properties. How should a JSON serializer handle those?
I think you're mixing up an array as an object and an array as a literal. An array as a literal is just [1, 2, 3, 4]. Now internally, the array as an object presumably has some property that points to the actual value of the array. It also has other properties (like length) and methods that act upon it (like slice).
The JSON serializer is concerned with the value of the object. If x is an array, then the thing that must be serialized is the value of x, which is [1, 2, 3, 4]. The properties of x are entirely different.
If you want to serialize these additional properties, then you would have to write your own serializer that will iterate over the properties of the array and represent everything in a map/associative array. This is the only way; the caveat, as I mentioned before, is that you no longer have an actual array.
Arrayobject because they are built on top of theObjecttype, though you're not really supposed to. What is your intention?var x = {}; x.array=[1,2,3,4]; x.name = "myArray";or make it JSON to begin with:var x={"name":"myArray","array":[1,2,3,4]}