To add elements to the left side of the array ____ function is used.

Tâm Tây

New member
To add elements to the left side of the array ____ function is used.
A. pop
B. push
C. queue
D. unshift
 
Answer: d
Explanation: Ta add elements to the left side of the array, use the unshift function. For example,
Code:
@list= (5,9) ;                // this is 5,9
unshift( @list,1. .3) ;      // now it becomes 1,2,3,5,9
 

Tìm kiếm

Back
Top