为什么从-2到-1不行?
<script type="text/javascript"> var myarr1= ["我","爱","你"]; // document.write(myarr1.slice(1,3)); document.write(myarr1.slice(-2,-1));//显示的是一个爱字 </script>
<script type="text/javascript"> var myarr1= ["我","爱","你"]; // document.write(myarr1.slice(1,3)); document.write(myarr1.slice(-2,-1));//显示的是一个爱字 </script>
2016-08-09
举报