11.25 Q&A

2020-11-25

  1. 按字母顺序排列 - sort list alphabetically
var items = ['asad', 'asddd', 'qwe', 'cafe', 'aac', 'accc'];
console.log(items.sort(function (a, b) {
  return a.localeCompare(b); //using String.prototype.localCompare()
}));
//["aac", "accc", "asad", "asddd", "cafe", "qwe"]
  1. nextjs 带 google-analytics
copyright ©2019-2024 shenzhen
粤ICP备20041170号-1