var arr = [1, 5, 84, 4894, 44, 45, 454, 444, 515, 3, 4, 84, 4894, 44, 45, 454, 444, 515, 3, 4, 6, 6, 6, 6, 4]
for (var i = 0i <arr.lengthi++) {
if (arr.indexOf(arr[i]) == i) {
var num = 1
for (var j = i + 1j <arr.lengthj++) {
if (arr[i] === arr[j]) {
num++
}
}
console.log(arr[i] + "出现的次数是:" + num)
}
}
</script>