<script>
"use strict"
var test = function(){
var str = "java-arrke-aboslue-all",
ret = new Array(),
i=0,
length = str.length;
for(;i<length;i++){
var temp = str.indexOf("a",i);
if(temp>0){
ret.push(temp);
i = temp;
}
}
console.log(ret);
};
test();
</script>