What is the correct way to write a JavaScript array? - Study24x7
Social learning Network
study24x7

Default error msg

Login

New to Study24x7 ? Join Now
Already have an account? Login
617 followers study24x7 18 Apr 2019 07:52 PM study24x7 study24x7

What is the correct way to write a JavaScript array?

A

var colors = ["red", "green", "blue"]  

B

var colors = (1:"red", 2:"green", 3:"blue")

C

var colors = 1 = ("red"), 2 = ("green"), 3 = ("blue")

study24x7
Write a comment
Related Questions
500+   more Questions to answer
Most Related Articles