1. Home
  2. Federal Board of Intermediate and Secondary Education (FBISE)
  3. Computer Science FBISE Class 10
  4. In JavaScript, how do you access the third element of an…

Added 10 Nov 2026

In JavaScript, how do you access the third element of an array named myArray?

  1. myArray[3]
  2. myArray[2] Correct answer
  3. myArray[1]
  4. myArray[0]

Correct answer

B. myArray[2]

14 views

MCQSEXAM

Explanation

Array indexing starts at 0, so the third element is at index 2: myArray[2]. Source: Scribd, Class X Computer Science Exam (FBISE), Section A.

Reference

Asked in: Matric,FBISE

Preparing for an exam?

Doubts & discussion

Not sure why the answer is B? Ask here and get an explanation.

Ask a doubt about this MCQ

Shown after review. No links please.

More Computer Science FBISE Class 10 MCQs

Practise all Computer Science FBISE Class 10 MCQs

Similar MCQs