Loading...
const arr = [1, [2, [3, [4, 5]]]]; function flatten(arr) { const res = [];...
function Person(name, sex) { this.name = name; this.sex = sex; } Person....
instanceof 运算符用于检测构造函数的 prototype 属性是否出现在某个实例对象的原型链上。class Person {} class S...
function myNew(fn, ...args) { // 1.在内存中创建一个新对象 const obj = {}; // 2.把新对...
function currying(fn) { return function curried(...args1) { if (args1.l...