摘要: 1、函数创建: 1)声明式(会做代码提升,就是可以在函数声明前调用) function add() { } 2)字面量/表达式 var add = function () { }; 3)Function构造函数 2、函数用途: 1)赋值给一个变量 2)赋值给对象的一个属性 3)作为函数参数传递 4) 阅读全文
posted @ 2019-12-15 22:08 雨夜稻草 阅读(191) 评论(0) 推荐(0) 编辑
摘要: 1、Object.assign function custion (options) { this.default = { width : 100 , height : 100 , color : "red" } this.settings = Object.assign(this.default 阅读全文
posted @ 2019-12-15 21:02 雨夜稻草 阅读(133) 评论(0) 推荐(0) 编辑
摘要: 1、解决模块加载过慢 2、核心:define函数 阅读全文
posted @ 2019-12-15 16:20 雨夜稻草 阅读(231) 评论(0) 推荐(0) 编辑
摘要: exec test match RegExp https://tool.oschina.net/uploads/apidocs/jquery/regexp.html 阅读全文
posted @ 2019-12-15 15:13 雨夜稻草 阅读(72) 评论(0) 推荐(0) 编辑
摘要: 1、增 1、indexOf :不支持正则参数 2、search:支持正则参数 阅读全文
posted @ 2019-12-15 15:07 雨夜稻草 阅读(82) 评论(0) 推荐(0) 编辑
摘要: "xxxxx".repalce('/正则/,"x") 阅读全文
posted @ 2019-12-15 14:52 雨夜稻草 阅读(59) 评论(0) 推荐(0) 编辑
摘要: var a = /\bd+ (pig|cow|cko)\b/ console.log(a.test("15 pig") //true 阅读全文
posted @ 2019-12-15 14:45 雨夜稻草 阅读(322) 评论(0) 推荐(0) 编辑
摘要: 1、模块:拆分功能的JS脚本文件,各模块之间作用域互不影响 2、模块打包:编译,链接,整合文件,形成单一可执行文件;打包工具:Webpack,Parcel,Rollup 阅读全文
posted @ 2019-12-15 10:47 雨夜稻草 阅读(81) 评论(0) 推荐(0) 编辑