Sabtu, 17 April 2010

Logic sort name


#body>

#script>

var arr=new Array(4);

arr[0]="jane";

arr[1]="andi";

arr[2]="toni";

arr[3]="cici";

document.write(arr + "#br/>");

document.write(arr.sort());

#/script>

#/body>

#body>

#script>

var arr=new Array(3);

arr[0]="Sinta";

arr[1]="Santi";

arr[2]="Santa";

var arr2=new Array(3);

arr2[0]="Anna";

arr2[1]="Kiki";

arr2[2]="Budi";

var arr3=new Array(3);

arr3[0]="Simanjuntak";

arr3[1]="Manurung";

arr3[2]="Haloho";

document.write(arr.concat(arr2,arr3));

#/script>

#/body>