Which is the correct way to write a JavaScript array?

A.  var txt = new Array(1:”tim”,2:”kim”,3:”jim”)
B.   var txt = new Array:1=(“tim”)2=(“kim”)3=(“jim”)
C.  var txt = new Array(“tim”,”kim”,”jim”)
D.  var txt = new Array=”tim”,”kim”,”jim”

Ans: C

No comments:

Post a Comment

The advantages of Outsourcing Web Development Services

In the present digital world, acquiring a solid web presence is essential for companies to flourish. A well designed site is much much more ...