摘要:
//手机构造函数 function Phone(brand, price) { this.brand = brand; this.price = price; } //添加 方法 Phone.prototype.call = function() { console.log('我打电话') } // 阅读全文
摘要:
map为键值对集合 let m = new Map(); m.set('name', '小白'); m.set('chang', function() { console.log("改变自己"); }) let key = { school: 'NONGDA' }; m.set(key, ['bei 阅读全文
摘要:
let arr = [1, 2, 3, 4, 5, 4, 3, 2, 1]; //数组去重 let result = [...new Set(arr)]; console.log(result); //交集 let arr2 = [4, 5, 5, 6, 6]; let result = [...n 阅读全文