ES6基础-ES6的扩展
进行对字符串扩展,正则扩展,数值扩展,函数扩展,对象扩展,数组扩展。 开发环境准备: 编辑器(VS Code, Atom,Sublime)或者IDE(Webstorm) 浏览器最新的Chrome 字符串的扩展: 模板字符串,部分新的方法,新的unicode表示和遍历方法: 部分新的字符串方法 padStart,padEnd,repeat,startsWith,endsWith,includes 字符串的扩展: Unicode和UTF-16是什么和他们的关系 用for-of遍历字符: 模板字符串是什么: `dashucoding` const da = { name: 'dada', age: 12, say1: function() { console.log('da'); }, say2: function() { console.log('da'); } } da.say1(); da.say2(); '我叫'+ this.name.toUpperCase() + ',我今年' + this.age + '岁' // 模板字符串 (`我叫${` Mr.${this.name.toUpperCase() }` },我今年${this.age}岁!`); const getList = function() { // ajax return{ status: true, msg: