2019独角兽企业重金招聘Python工程师标准>>>
var box = 'Mr.Lee is Lee L L sad L';
var boxarr=[];
var pos = box.indexOf('L');
while(pos>-1){
boxarr.push(pos);
pos= box.indexOf('L',pos+1);
}
alert(boxarr);
2019独角兽企业重金招聘Python工程师标准>>>
var box = 'Mr.Lee is Lee L L sad L';
var boxarr=[];
var pos = box.indexOf('L');
while(pos>-1){
boxarr.push(pos);
pos= box.indexOf('L',pos+1);
}
alert(boxarr);
转载于:https://my.oschina.net/projerry/blog/479053