In JavaScript, what does [1, 2, 3].push(4) return?
Show answerHide answer
Correct answer: (D) 4 (the new length)
Explanation
push() returns the new length of the array.
Correct answer: (D) 4 (the new length)
Explanation
push() returns the new length of the array.
This is question 174 of DSSSB TGT Computer Science Full Mock Test 4. See all questions of this paper with answers, or attempt the paper as a timed online test to get your score and all-India rank.