数组的length 属性4

2017-06-15 18:38:00
admin
原创
515
<!DOCTYPE html>
<html>
<head>
    <title>Array Type Example 6</title>
    <script type="text/javascript">
        
        var colors = ["red", "blue", "green"];    //creates an array with three strings
        colors[99] = "black";                     //add a color (position 99)
        alert(colors.length);  //100


    </script>
</head>
<body>

</body>
</html>
  • QQ讨论群
  • 关注微信
    • 欢迎咨询
    • 欢迎加入QQ群 16506021
  • 公众号:源宝网络