Which of the following references the first and last element in a non-empty array?
B.
Array indices start with 0, making Options C and D incorrect.
The length attribute refers to the number of elements in an array.
It is one past the last valid array index. Therefore, Option B is correct.