0 votes
in JavaScript by
Which one of the following given task is performed by the "pop()" method of the array?

a) Itupdates the element of the array

b) it increments the total length of the array by 1

c) It prints the first element and made no impact on the length of the array

d) updates the element removes one element of an array on each time the "pop()" function called

1 Answer

0 votes
by

Answer: D

Reason: The "pop()" method is used for removing the last element of the array, or we can say, it removes/deletes the element from the tail-side of an array. Hence every time the "pop()" method is called, the value of the array's length gets decremented by one.

Related questions

0 votes
asked Mar 24, 2021 in JavaScript by sharadyadav1986
0 votes
asked Mar 23, 2021 in JavaScript by sharadyadav1986
...