Question:What is the correct way to write a one dimensional JavaScript array? 

A var txt = new Array(1:"tim",2:"shaq",3:"kobe") 

B var txt = new Array="tim","shaq","kobe" 

C var txt = new Array("tim","shaq","kobe") 

D var txt=["tim","shaq","kobe"] 

E var txt = new Array() txt[0]="tim" txt[1]="shaq" txt[2]="kobe" 

+ Answer
+ Explanation
+ Report
Total Preview: 1240

Copyright © 2024. Powered by Intellect Software Ltd