Open In App

Web technologies Questions | JavaScript Course Quiz 1 | Question 37

Like Article
Like
Save
Share
Report

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


Last Updated : 26 Aug, 2021
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads