数组长度应该是8吧,为什么写出来的长度却是4。。。。。。我写错了?
<script type="text/javascript">
var myarr=['*','**','***','****'];
alert(myarr.length);
for(var i = 0; i < myarr.length; i++) {
document.write(myarr[i]+'<br />');
}
</script>
<script type="text/javascript">
var myarr=['*','**','***','****'];
alert(myarr.length);
for(var i = 0; i < myarr.length; i++) {
document.write(myarr[i]+'<br />');
}
</script>
2015-03-16
举报