A

Admin • 828.03K Points
Coach

Q. What is the correct way to create an array?

  • (A) let arr = [1,2,3];
  • (B) let arr = (1,2,3);
  • (C) let arr = array(1,2,3);
  • (D) let arr = new array(1,2,3);
  • Correct Answer - Option(A)
  • Views: 7
  • Filed under category JavaScript
  • Hashtags:

Explanation by: Admin
Square brackets are the standard syntax for array literals in JavaScript.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.