ES6学习笔记-字符串、函数

字符串 es6对字符串新增了不少方便的功能,下面咱们能够逐一来看一下。es6 1.字符串格式化 将表达式嵌入字符串中进行拼接。用${}来界定。web //ES5 var name = 'will' console.log('hello' + name) //es6 var name = 'will'; console.log(`hello ${name}`) 2.includes:判断是否包含而
相关文章
相关标签/搜索