var stringValue="good game well play";
var position=new Array();
var pos=stringValue.indexOf("e");
while(pos>-1 )
{
position.push(pos);
pos=stringValue.indexOf("e",pos+1);}
alert(position);
var stringValue="good game well play";
var position=new Array();
var pos=stringValue.indexOf("e");
while(pos>-1&&pos<stringValue.length )
{
position.push(pos);
pos=stringValue.indexOf("e",pos+1);}
alert(position);