Development - Java Script - Arrays Question And Answers

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"  

View Answer  

The _______ method of an Array object adds and/or removes elements from an array.

A.  Reverse

B.  Shift

C.  Slice

D.  Splice

View Answer  

_________ is a wrapped Java array, accessed from within JavaScript code.

A.  JavaArray

B.  JavaClass

C.  JavaObject

D.  JavaPackage

View Answer  

In the below notation, Employee is of type { “Employee”: [ “Amy”, “Bob”, “John” ] }

A.  Not a valid JSON string

B.  Array

C.  Class

D.  Object

View Answer