赞
踩
将一个或多个元素添加到数组的开头,并返回该数组的新长度。
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>unshift()将元素添加到数组的开头</title>
<script type="text/javascript">
var arr = ["康熙","雍正","乾隆","嘉庆"];
arr.unshift("爱新觉罗家族");
console.log(arr);
</script>
</head>
<body>
</body>
</html>
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。