JS笔记
小奶包他干奶奶
这个作者很懒,什么都没留下…
展开
-
js代码优化
js代码优化转载 2023-01-31 10:26:38 · 127 阅读 · 0 评论 -
const定义变量时的{}
https://www.jianshu.com/p/b4c13f532e58原创 2021-11-30 14:00:41 · 94 阅读 · 0 评论 -
一些小知识
https://zhuanlan.zhihu.com/p/355394962原创 2021-11-12 16:03:08 · 655 阅读 · 0 评论 -
?.是什么
语法 obj?.prop obj?.[expr] arr?.[index] func?.(args) 函数调用: let result = someInterface.customMethod?.(); 可选链与表达式: let nestedProp = obj?.['prop' + 'Name']; 可选链访问数组: let arrayItem = arr?.[42]; 连用可选链操作: let customerCity = customer.details?.address?.c转载 2021-11-11 10:54:27 · 85 阅读 · 0 评论 -
vue把对象给某个变量,改变变量的值,源对象也会变化
this.optionB=JSON.parse(JSON.stringify(this.optionA))原创 2021-08-24 11:50:03 · 248 阅读 · 0 评论 -
使方法按顺序执行
promise.all([func(),func2(),func3()]).then(res=>{ console.log(Res) })原创 2021-08-24 11:46:33 · 91 阅读 · 1 评论 -
ES6数组去重
list=Array.from(new Set(list))原创 2021-08-24 11:41:24 · 62 阅读 · 0 评论