摘要:
ES5的写法 封装mybind 通过函数原型添加属性 Function.prototype.myBind = function (obj, ...args1) { // this 是原本的函数 // console.log(this) let self = this return function 阅读全文
posted @ 2020-08-23 23:04
小码LQ~
阅读(184)
评论(0)
推荐(0)
摘要:
== 在比较过程中会存在隐士类型转换, 则是值和类型必须完全相同 1.[] == ![] ①、根据运算符优先级 ,! 的优先级是大于 == 的,所以先会执行 ![] !可将变量转换成boolean类型,null、undefined、NaN以及空字符串('')取反都为true,其余都为false。 所 阅读全文
posted @ 2020-08-23 21:18
小码LQ~
阅读(628)
评论(0)
推荐(0)
摘要:
一、一般的遍历数组的方法: var array = [1,2,3,4,5,6,7]; for (var i = 0; i < array.length; i) { console.log(i,array[i]); } 二、用for in的方遍历数组 for(let index in array) { 阅读全文
posted @ 2020-08-23 10:54
小码LQ~
阅读(640)
评论(0)
推荐(0)

浙公网安备 33010602011771号