What is the correct way to write a JSON array?
Choose the correct option from below list
(1)var colors = 1 = ("red"), 2 = ("green"), 3 = ("blue")
(2)var colors = "red", "green", "blue"
(3)var colors = (1:"red", 2:"green", 3:"blue")
(4)var colors = ["red", "green", "blue"]
Answer:-(4)var colors = ["red", "green", "blue"] | |