摘要: const calculator = { count: 0, next() { return ++this.count }, double(a) { return a * 2 }, add(a, b) { return a + b } } calculator.add(2, 3) // functi 阅读全文
posted @ 2024-07-18 18:21 howhy 阅读(5) 评论(0) 推荐(0) 编辑
摘要: const customConfig = { a: 22, b: 33 } function config(config = {}) { const defaultConfig = { a: 12, b: 23, c: 'aa' } const finallyConfig = { ...defaul 阅读全文
posted @ 2024-07-18 18:02 howhy 阅读(8) 评论(0) 推荐(0) 编辑
摘要: const students = [ { name: 's1', age: 22, sex: 'female' }, { name: 's2', age: 22, sex: 'male' }, { name: 's3', age: 23, sex: 'female' }, { name: 's4', 阅读全文
posted @ 2024-07-18 16:35 howhy 阅读(3) 评论(0) 推荐(0) 编辑