码迷,mamicode.com
首页 > 其他好文 > 详细

es6常用的方法

时间:2020-01-09 18:31:17      阅读:73      评论:0      收藏:0      [点我收藏+]

标签:word   代码   lse   comment   sub   pre   comm   实例   不包含   

1、判断是否包含,当包含时返回true,不包含时返回false,代码实例如下:     

    let string = "123345";
    let substring1 = "12"; let substring2 = "01"; string.includes(substring1); //true string.includes(substring2); //false

2、下次再写

es6常用的方法

标签:word   代码   lse   comment   sub   pre   comm   实例   不包含   

原文地址:https://www.cnblogs.com/xiao-wu-gui/p/12172647.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!