the mesh class?

ok i need to learn how to use the mesh class in unity, but i cant manage to figure it out.

that is what i have so far, and it returns an error.

#pragma strict
var newVertices : Vector3[];

var newUV : Vector2[];
var triangle : int[];

function Start () {
	var mesh : Mesh = new Mesh ();
    GetComponent(MeshFilter).mesh = mesh;
    mesh.vertices = newVertices;
    mesh.uv = newUV;
    mesh.triangles = triangle;
}

function Update () {
}

any help? also, can anyone direct me in the direction of a tutorial of how to properly edit the mesh once created?

first you should read the document.
new vertices are positions of the vertices(like (0,0,0),(0,1,0),(1,1,0),(1,0,0)),and newUV is the corresponding texure coordinate like (0,0),(0,1),(1,1),(1,0),next you have 2 assign the triangles turn of the vertices(clock wise or anticlock wise),like(0,1,2),(1,3,2)this is clock wise.

what do you mean with the triangle? assign it a direction? like just numeric, or do i have to actual vertices i have created?

every polygon(here is quad) is made of many triangles.and triangles are made of vertices.and the three vertices can be clockwise or anticlock wise.well clockwise or anticlockwise determines the front,and the back will be culled.
after all the system has to know the triangles,because only triangles can be rendered.the trouble is when you give it a polygon(here is quad),it doesnt know the triangles.when you give the numeric,it is done.