1 var stringValue = "Lorem ipsum dolor sit amet, consectetur adipisicing elit";
2 var positions = new Array();
3 var pos = stringValue.indexOf("e");
4
5 while (pos > -1) {
6 positions.push(pos);
7 pos = stringValue.indexOf("e", pos + 1);
8 }
9 console.log(positions);
2 var positions = new Array();
3 var pos = stringValue.indexOf("e");
4
5 while (pos > -1) {
6 positions.push(pos);
7 pos = stringValue.indexOf("e", pos + 1);
8 }
9 console.log(positions);