08 2021 档案

摘要:在编写 JS 代码时,经常会遇到逻辑判断复杂的情况。一般情况下,可以用 if/else 或 switch 来实现多个条件判断,但会出现一个问题:随着逻辑复杂度的增加,代码中的 if/else 和 switch 会越来越臃肿 if (status == 1) { // 逻辑1 } else if (s 阅读全文
posted @ 2021-08-30 16:09 王小美丶 阅读(452) 评论(0) 推荐(0) 编辑
摘要:let newArr = [] allMonth.forEach(el=> { const res = newArr.findIndex(ol=> { return el.month ol.month; }); if (res !== -1) { newArr[res].value = newArr 阅读全文
posted @ 2021-08-18 16:53 王小美丶 阅读(330) 评论(0) 推荐(0) 编辑

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