var arr = [7, 2, 6, 5, 9, 4, 3, 1, "c", "a", "b"]
function sort(a, orderBy = "asc") {
let arrs = []
let stringCode = []
//将字符串和数字筛选出来并转成ASCII码
for (let i of a) {
if (typeof i !== "number" && typeof i === "string") {
stringCode.</
简单手写js的Array.sort()
最新推荐文章于 2024-03-18 16:14:35 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)