Which is the correct way to write a JavaScript array?
Options
- var txt = new Array(1:"arr",2:"kim",3:"jim")
- var txt = new Array:1=(" arr ")2=("kim")3=("jim")
- var txt = new Array("arr ","kim","jim")
- var txt = new Array=" arr ","kim","jim"
CORRECT ANSWER : var txt = new Array("arr ","kim","jim")
Write your comments