摘要:
1.reduce 求数组中数值之和 /** * 1. reduce 求和 */ let arr = [1, 2, 3, 4, 5]; // let sum = arr.reduce(function (pre, cur, index) { // console.log(pre, cur, index 阅读全文
posted @ 2021-09-01 21:13
青柠i
阅读(85)
评论(0)
推荐(0)
摘要:
全局作用域和函数作用域,基本概念大家应该都知道,这次总结一下深层次的作用域 function fn(a, c) { console.log(a) // function a() { } var a = 123 console.log(a) // 123 console.log(c) // funct 阅读全文
posted @ 2021-09-01 17:30
青柠i
阅读(50)
评论(0)
推荐(0)
摘要:
隐式转换 1.题目: //1. console.log(1 + "true"); console.log(1 + true); console.log(1 + undefined); console.log(1 + null); //2. console.log("2" > 10); console 阅读全文
posted @ 2021-09-01 17:24
青柠i
阅读(119)
评论(0)
推荐(0)

浙公网安备 33010602011771号