CJCoding With Joseph
← Back to Question List
JavaScript Code Walkthrough #2

Array push and length

easyArrays

📄 Code

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

🎯 Your Answer