02 2021 档案

摘要:foo() var foo function foo() { console.log(1) } foo = function () { console.log(2) } console.log(foo) function Foo() { getName = function () { console 阅读全文
posted @ 2021-02-04 20:32 陈小作 阅读(132) 评论(0) 推荐(0)
摘要:1、数组去重的方式 // 数组去重实现得四种方式 let arr = [1,3,1,5,6,8,1,2,3,6] // 1、利用set() arr = [...new Set(arr)] arr = Array.from(new Set(arr)) // 2、使用includes/indexOf ( 阅读全文
posted @ 2021-02-04 20:28 陈小作 阅读(135) 评论(0) 推荐(0)
摘要:学习链接:https://segmentfault.com/a/1190000018428170 拉动滚动条不停触发事件,此时会触发多次该函数 function showTop() { let scrollTop = document.body.scrollTop || document.docum 阅读全文
posted @ 2021-02-02 15:43 陈小作 阅读(76) 评论(0) 推荐(0)