JS sort函数(按照首字母字符排序)

直接调用sort的排序是按照首字母的大小来从小到大进行排列的 var myArry = ['b', 'c' ,'a'] console.log(myArry.sort()) // [ 'a', 'b', 'c' ] var myArry = ['1', '3' ,'2'] console.log(myArry.sort()) // [ '1', '2', '3' ] var myArry
相关文章
相关标签/搜索