0 votes
in JavaScript by (30.5k points)
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 (30.5k points)

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