08 2022 档案

摘要:先看道题 var obj = { hi: function(){ console.log(this); return ()=>{ console.log(this); } }, sayHi: function(){ return function() { console.log(this); ret 阅读全文
posted @ 2022-08-15 16:00 北火廿口 阅读(39) 评论(0) 推荐(0) 编辑
摘要:判断数据类型 function myTypeOf(obj) { let res = Object.prototype.toString.call(obj).split(' ')[1] res=res.substring(0, res.length - 1).toLowerCase() return 阅读全文
posted @ 2022-08-09 18:34 北火廿口 阅读(27) 评论(0) 推荐(0) 编辑
摘要:Loader loader就是将webpack不能识别的文件转换为webpack可识别的模块 loader是一个函数,当webpack解析资源时会调用相应的loader去处理,loader接收到文件内容作为参数,返回内容出去 分类 pre:前置loader normal:普通loader inlin 阅读全文
posted @ 2022-08-05 18:57 北火廿口 阅读(73) 评论(0) 推荐(0) 编辑
摘要:先上代码 button.addEventListener('click', () => { Promise.resolve().then(() => console.log('Miscr1')) console.log('L1') }) button.addEventListener('click' 阅读全文
posted @ 2022-08-05 11:42 北火廿口 阅读(103) 评论(0) 推荐(0) 编辑
摘要:在 JavaScript 内部,数组就是用数字作为键名的对象。 ['a', 'b', 'c'] 在本质上就等于 { 0: 'a', 1: 'b', 2: 'c', length: 3 } 当访问数组中索引 0 的元素时,实际上访问的是对象中键名为 0 的属性的键值。这很重要,因为当你把数组作为对象看 阅读全文
posted @ 2022-08-05 11:26 北火廿口 阅读(251) 评论(0) 推荐(0) 编辑
摘要:var svg1 = '<svg xmlns="http://www.w3.org/2000/svg" width="390px" height="200px">' + '' + '<foreignObject x="0" y="0" width="100%" height="100%">' + ' 阅读全文
posted @ 2022-08-02 15:07 北火廿口 阅读(885) 评论(1) 推荐(1) 编辑

点击右上角即可分享
微信分享提示