合并两个数组 - concat()
源代码:
点击按钮合并数组。
测试结果:
Cecilie,Lone,Emil,Tobias,Linus
合并三个数组 - concat()
源代码:
测试结果:
Jani,Tove,Stale,Kai Jim,Borge,Cecilie,Lone
数组排序(按字母顺序升序)- sort()
源代码:
Click the button to sort the array.
测试结果:
Apple,Banana,Mango,Orange
数字排序(按数字顺序升序)- sort()
源代码:
Click the button to sort the array.
测试结果:
1,5,10,25,40,100
数字排序(按数字顺序降序)- sort()
源代码:
Click the button to sort the array.
测试结果:
100,40,25,10,5,1
将一个数组中的元素的顺序反转排序 - reverse()
源代码:
Click the button to reverse the order of the elements in the array.
测试结果:
Mango,Apple,Orange,Banana
Copyright 2014-2023 //m.sbmmt.com/ All Rights Reserved | 苏州跃动光标网络科技有限公司 | 苏ICP备2020058653号-1
| 本站CDN由 数掘科技 提供