<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>javascript020.html</title>
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="this is my page">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<!--<link rel="stylesheet" type="text/css" href="./styles.css">-->
<script type="text/javascript">
/*
Array对象中的方法 sort()对数组进行排序 升序
Array对象中concat()方法更多数组组合而成的新数组
*/
var arr = [3,4,1,5,2,0,9,7,6,8];
var a = arr.sort();
alert(a);
/*var arr1 = ["abc",false];
var arr2 = ['你',"我",'他'];
var newArr = arr.concat(arr1,"EEE",222,333,4.5678,arr2);
alert(newArr);*/
</script>
</head>
<body>
</body>
</html>
JavaScript基础(10)—Array对象(6)
最新推荐文章于 2022-04-12 10:05:54 发布