c的std::sort用的排序算法 http://en.wikipedia.org/wiki/Introsort Introsort or introspective sort is a sorting algorithm designed by David Musser in 1997. It begins with quicksort and switches to heapsort when the recursion depth exceeds a level based on (th…
【前言】
// 对象或者数组都是引用类型,判断相等是根据二者指向地址是否相同
let m {}
m {} // false
m null // false【解决方法】 1、使用 ES6 的 Object.keys() 方法,返回值是对象中属性名组成的数组(不含深层引用类型)。判断属性数组…