<html>
<head>
<script type="text/javascript">
Array.prototype.getUnique = function() {
var o = new Object();
var i, e;
for (i = 0; e = this[i]; i++) {o[e] = 1};
var a = new Array();
for (e in o) {a.push (e)};
return a;
}
function Perform(){
var arr = new Array();
arr[0] = "hello";
arr[1] = "world";
for(i in arr){
console.log(arr[i]);
}
}
</script>
</head>
<body onload="Perform()">
</body>
</html>
在控制檯上面的代碼的結果是意外輸出(...在...)環
hello
world
function()
從其中確實來自最後function()
?