Vue学习扩展
- 字符串扩展
- 结构表达式
- 函数优化
String原始方法
- indexOf
- lastindexOf
- length
- substr
- substring
- charAt
- concat
ES6字符串扩展API:
- includes()
返回布尔值,表示是否找到了参数字符串 - startsWith()
返回布尔值,表示参数字符串是否在原字符串头部 - endsWith()
返回布尔值,表示参数字符串是否在原字符串尾部
结构表达式
let arr =[1,2,3]
ES6通过摄制角标来获取值
const [x,y,z] = arr;
console.log(x,y,z);
对象:
const person = {
name:"jack",
age:21,
language: ['java','js'