摘要: 内置排序 浏览器内置有排序方法,这里有详细的文档 const array = [11, 2, 3, 6, 2, 9]; const res = array.sort(); console.log(res); // [11, 2, 2, 3, 6, 9] 可以看到针对两位的数字 此方法就无法正确排序。 阅读全文
posted @ 2021-09-06 11:53 丁少华 阅读(92) 评论(0) 推荐(0)