数据示例:
数组a:
1
,
3
,
5
,
7
,
9
,
11
,
13;
数组
b:
1
,
2
,
4
,
6
,
8
,
10
,
12;
var
a = [
1
,
3
,
5
,
7
,
9
,
11
,
13
];
var
b = [
1
,
2
,
4
,
6
,
8
,
10
,
12
];
var
c = $.merge(a, b);
document.writeln(
‘合并:’
+ c +
‘<br />’
);
var
d = $.unique(c);
document.writeln(
‘去重:’
+ d +
‘<br />’
);
var
e = d.sort(
function
(a, b)
{
return
a – b;
});
document.writeln(
‘排序:’
+ e +
‘<br />’
);
知识点备注:
版权声明:本文为qq_35606175原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。