CJCoding With Joseph
15free / daySign inCreate account
Back to Code Walkthrough

Array push and length

JavaScript code walkthrough · Question 2
easyArrays

Code

Read carefully. What does this print?
1const a = [1, 2];
2a.push(3);
3a.push(4);
4console.log(a.length);

Your answer