Home » HTML » Html miscellaneous » Question
  1. Arrays in JavaScript are written within ____________.
    1. “”
    2. {}
    3. ()
    4. [].
    5. None of these
Correct Option: D

Arrays in JavaScript are written in square brackets. The elements of array are separated by commas. Index of array items starts from 0. E.g. var fruits= [“apple”, “orange”, “banana”, “pine-apple”]; objects in JavaScript are written inside curly brackets.



Your comments will be displayed only after manual approval.