Q. What is the correct way to write a JavaScript array?
Solution:
Arrays in JavaScript are defined with square brackets, e.g., var colors = [‘red’, ‘blue’].
Get Question Bank
Strengthen Your Practice with our comprehensive question bank.
Arrays in JavaScript are defined with square brackets, e.g., var colors = [‘red’, ‘blue’].
Strengthen Your Practice with our comprehensive question bank.