Which JavaScript method removes the last element of an array?
-
A
pop()
Correct answer
-
B
push()
-
C
shift()
-
D
unshift()
10 views
Explanation
pop() removes the last element. Source: Standard JavaScript content (FBISE-aligned).
Reference
Asked in: Matric,FBISE
Doubts & discussion
Not sure why the answer is A? Ask here and get an explanation.
Ask a doubt about this MCQ