Which is the correct way to write a JavaScript array?

Question:Which is the correct way to write a JavaScript array?

1.var txt = new Array(1:” Tim”,2:” Kim”,3:” Jim”)

2. var txt = new Array_1=(“Tim”)2=(“Kim”)3=(“Jim”)

3.var txt = new Array(“Tim”,” Kim”,” Jim”)

4.var txt = new Array=” Tim”,” Kim”,” Jim”


Search
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!