var price=[100,500,200,800,1000];
price.sort(function(a,b){
return a-b; //从小到大
//return b-a; 从大到小
});
var name=["帅哥","阿哲,"赵四","李琛"];
name.sort(function(a,b){ //排序中文按照开头一个字母
return a.localeCompare(b);
});
var test=[a,b,c,d,e];
test.splice(1,3);//截取
test.splice(1,0,4,5,6); // [1, 7, 8, 9, 2, 3, 4, 5];插入
test.splice(1,3,7,8,9) //替换