javascript
小伙看你根骨奇佳,潜力无限,来学PHP伐。
push() 方法可向数组的末尾添加一个或多个元素,并返回新的长度。
3 is actually the length of the new array.
Experiment yourself, push execution will return the length of the array
What is printed is push的返回值,pushreturning the new length
push
push() adds one or more elements to the end of the array and returns the new length.
Reference http://www.w3school.com.cn/js...
The
push() method adds one or more elements to the end of the array and returns the new length of the array, so what is printed is the length of the array.
Refer to this document
3 is actually the length of the new array.
Experiment yourself, push execution will return the length of the array
What is printed is
push
的返回值,push
returning the new lengthpush() adds one or more elements to the end of the array and returns the new length.
Reference http://www.w3school.com.cn/js...
The
push() method adds one or more elements to the end of the array and returns the new length of the array, so what is printed is the length of the array.
Refer to this document