1、ES6字符串扩展:
(1).API聚焦:str.indexOf(); str.includes(); str.repeat(num);
(2).模版字符串:``以及${}的使用[都称为模版字符串] -> 优点:更好的处理字符串拼接;语义化更好;防止注入xss;[xss恶意脚本攻击:使用document.write();<script>标签等向页面写入脚本代码,篡改页面 ]
2、ES6数组扩展 -> Array.of(); Array.from(); arr.find(); arr.findIndex(); arr.fill();










网友评论