Open In App

Web technologies Questions | JavaScript Course Quiz 1 | Question 37

Which of the following is the correct syntax for array declaration
(A) const arr={1,2,3,4}
(B) const arr=[1,2,3,4]
(C) Both a and b
(D) None of the above

Answer: (B)
Explanation: Arrays in javascript are declared using ‘[]’ square brackets
Quiz of this Question
Please comment below if you find anything wrong in the above post

Article Tags :