摘要: [1, 2, 3, 4].reduce((x, y) => console.log(x, y)) A: 1 2 and 3 3 and 6 4 B: 1 2 and 2 3 and 3 4 C: 1 undefined and 2 undefined and 3 undefined and 4 un 阅读全文
posted @ 2021-12-13 14:20 手掌日月摘星辰 阅读(58) 评论(0) 推荐(0) 编辑
摘要: let a = 3; let b = new Number(3) let c = 3; console.log(a == b); console.log(a b); console.log(b c); A:true false true B: false false true C: true fal 阅读全文
posted @ 2021-12-13 14:20 手掌日月摘星辰 阅读(56) 评论(0) 推荐(0) 编辑
摘要: let name = "Lydia"; function getName() { console.log(name); let name = "Sarah"; } getName(); A: Lydia B: Sarah C: undefined D: ReferenceError 参考答案: 阅读全文
posted @ 2021-12-13 14:18 手掌日月摘星辰 阅读(29) 评论(0) 推荐(0) 编辑
摘要: function getAge(...args) { console.log(typeof args); } getAge(21); A: "number" B: "array" C: "object" D: "NaN" 参考答案: 阅读全文
posted @ 2021-12-13 14:18 手掌日月摘星辰 阅读(30) 评论(0) 推荐(0) 编辑
摘要: console.log("🐭" + "🐍"); A: 🐭🐍 B:257548 C:A string containing their code points D:Error 参考答案: 阅读全文
posted @ 2021-12-13 14:17 手掌日月摘星辰 阅读(32) 评论(0) 推荐(0) 编辑
摘要: let newList = [1, 2, 3].push(4); console.log(newList.push(5)); A: [1,2,3,4,5] B: [1,2,3,5] C: [1,2,3,4] D: Error 参考答案: 阅读全文
posted @ 2021-12-13 14:17 手掌日月摘星辰 阅读(42) 评论(0) 推荐(0) 编辑
摘要: const name = "Lydia"; console.log(name()); A: SyntaxError B: ReferenceError C: TypeError D: undefined 参考答案: 阅读全文
posted @ 2021-12-13 14:16 手掌日月摘星辰 阅读(26) 评论(0) 推荐(0) 编辑
摘要: const settings = { username: 'lydiahallie', level: 19, health: 90 }; const data = JSON.stringify(settings, ['level', 'health']); console.log(data); A: 阅读全文
posted @ 2021-12-13 14:15 手掌日月摘星辰 阅读(27) 评论(0) 推荐(0) 编辑
摘要: const set = new Set(); set.add(1); set.add("Lydia"); set.add({ name: "Lydia" }); for (let item of set) { console.log(item + 2); } A: 3, NaN, NaN B: 3, 阅读全文
posted @ 2021-12-13 14:14 手掌日月摘星辰 阅读(27) 评论(0) 推荐(0) 编辑
摘要: const name = "Lydia"; age = 21; console.log(delete name); console.log(delete age); A: false, true B: "Lydia", 21 C: true, true D: undefined, undefined 阅读全文
posted @ 2021-12-13 14:13 手掌日月摘星辰 阅读(38) 评论(0) 推荐(0) 编辑