直接上代码:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>uvi</title>
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body>
<script>
var a=["hello","world"];
var b=["uvi","ivu"];
var c=a.concat(b);//数组合并
document.write(c); var d=["","","","","",""];
document.write(d.sort());//数组排序 document.write(d.sort(function(a,b){
return b-a;
}));//数组降序 var e=["a","b"];
e.push("c")//数组的末尾追加字符
document.write(e); var f = ["c","b","a"];
document.write(f.reverse());//数组的反转
</script>
<div id = "timetxt"></div> </body>
</html>