2020年6月4日

摘要: 1https://wangdoc.com/javascript/features/error.html 1 1 let a = 1 const test = () => { a = 2; throw new Error('给三失败'); // 抛出错误 a = 3; a = 4; } test(); 阅读全文
posted @ 2020-06-04 18:08 Mila_媛儿 阅读(249) 评论(0) 推荐(0)
 
摘要: 纯函数 同样的输入,得到同样的输出 不得修改参数 {...state, username: "test"} 不得调动 系统 I/O 的 API 不能调动不纯的 Date.now() 或者 Math.random() 等函数 高阶函数 参数是函数 或者 返回值是函数 filter、map、addEve 阅读全文
posted @ 2020-06-04 17:44 Mila_媛儿 阅读(343) 评论(0) 推荐(0)