Which is the correct syntax to declare an array in JavaScript?
- var arr = (1 2 3);
- var arr = [1 2 3];Answer
- var arr = {1 2 3};
- var arr = <1 2 3>;
Source: OTHER HEC NSCT — 4 Apr 2026found on TestPoint
Explanation coming soon.
Source: OTHER HEC NSCT — 4 Apr 2026found on TestPoint
Explanation coming soon.
We link to where we found each question. Explanations on this page are our own.