摘要:
遍历循环的使用 node_modules 不仅仅是当前目录,遍历所有目录都忽略 如果是./node_modules是 本来苦恼,每层都得加上 .gitignore 的 一、在项目根目录下(和.git在同一级目录下),增加.gitignore文件。 #开头 #注释,被git忽略 *.class #忽略 阅读全文
摘要:
var brr = ['apple','apple', 'strawberry', 'banana', 'pear', 'apple', 'orange', 'orange', 'strawberry']; var crr = brr.filter((element,index,self) => { 阅读全文
摘要:
如果没出现结果,返回-1 let str = '2300dsklkladsklsdkl' console.log(str.indexOf('s'))//5 console.log(str.indexOf('s2'))//-1 https://www.cnblogs.com/djd66/p/15687 阅读全文