这是怎么实现的额
<!DOCTYPE HTML>
<html >
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>数组</title>
<script type="text/javascript">
//创建数组
var arr = ['*','##',"***","&&","****","##*"];
arr[7] = "**";
var myarr=[];
for(var i=0;i<arr.length;i++) {
if(arr[i]){
if(arr[i].indexOf('*') > -1) {
if(arr[i].split('*').join('').length<=0) {
myarr.push(arr[i]);
}}}}
myarr.sort();
document.write(myarr.join('<br/>'));
</script>
</head>
<body>
</body>
</html>