Question:

Once this code is executed, how many items will numbers contain?

var numbers = [1, 2, 3]
numbers += [4]

Answer:

Correct answer: 4.

Explanation: The += operator, when applied to array, serves to append one array to another in place. In this case, it appends an array containing one item (4) to the existing array of three items.


Keywords:

© 2017 QuizBucket.org