es6
then啥
这个作者很懒,什么都没留下…
展开
-
模板字符串使用
function greet(name){ let weather='sunny'; return `Hello ${name}, today is a ${weather} day!`;}greet('Tom'); //"Hello Tom, today is a sunny day!"注:1.反引号内字符串不需要再用引号2.插入变量使用${...}3.可以...原创 2018-09-22 16:04:13 · 2125 阅读 · 0 评论 -
ES6过往知识点大致总结(仅作个人回顾,非全面)
1.let、const实现块作用域2.模板字符串:`${variable}`其间可通过$嵌入变量,{...}内可放入js表达式3.箭头函数:var f=()=>5等价于var f = function () { return 5 }; 注:this固化4.对象扩展:新增Object方法5.Symbol:新的原始数据类型,表示独一无二的值。对象属性名除了字符串类型外,也可...原创 2018-10-08 21:13:00 · 99 阅读 · 0 评论 -
解构赋值
解构对象const tom = { name:'tom', age:21, height:170, greet:function () { return `hello ,I'm ${this.name}` // console.log(`hello, I'm ${this.name}`) // console.log(thi...原创 2018-12-26 10:28:30 · 209 阅读 · 0 评论