/*
Trailing commas in array literals add to the length, but they shouldn‟t. JScript treats the empty element after the trailing comma as undefined. Example:
*/
<script>
document.write([1, 2, 3,].length);
</script>
/*
Output:
IE: 4
FF: 3
Opera: same as FF
Safari: same as FF
Array Initialiser 要小心
最新推荐文章于 2023-06-02 13:36:50 发布