摘要:
// 实现多种数组去重方法 const arr = [1, 2, 2, 3, 4, 4, 5, 'a', 'a', 'b']; // 方法1:使用 Set console.log([...new Set(arr)]) // 方法2:使用 filter + indexOf let newArr=arr 阅读全文
posted @ 2025-12-26 16:31
howhy
阅读(38)
评论(0)
推荐(0)
摘要:
function Animal(name) { this.name = name; } Animal.prototype.speak = function() { console.log(this.name + ' makes a noise'); }; function Dog(name, bre 阅读全文
posted @ 2025-12-26 15:28
howhy
阅读(29)
评论(0)
推荐(0)

浙公网安备 33010602011771号