Vidyalelo
Data Structure · Q21

Arrays in Data Structures

Programming · Data Structure · question 21

Q21

How do you access the last element of an array in JavaScript?

A.
array[length]
B.
array[-1]
C.
array[array.length - 1]
Answer
D.
array.getLast()

Answer: Option C

Solution

Answer: Option C
No explanation is given for this question Let's Discuss on Board