HomeQuizzesJavaScriptArrays & Methods
beginnerJS-BEG-004

Arrays & Methods

10 questions  ·  JavaScript  ·  beginner level

📝10 questions
No time limit
🔄Retake anytime
Instant feedback

Preview questions

1
Multiple Choice

What does this output?

const arr = [1, 2, 3]
const result = arr.reduce((acc, val) => acc + val, 0)
console.log(result)
A
B
C
D
🔒 Sign in to answer and see explanation
2
Fill in the Blank

Which method removes the LAST element and returns it?

const arr = [1, 2, 3]
const last = arr._______
// last = 3, arr = [1, 2]
A
B
C
D
🔒 Sign in to answer and see explanation
3
Multiple Choice

What is the output?

const a = [1, 2, 3]
const b = a
b.push(4)
console.log(a)
A
B
C
D
🔒 Sign in to answer and see explanation
+ 7 more questions
Sign in to attempt the full quiz
Free · No credit card required

Ready to attempt the full quiz?

Sign in to attempt all 10 questions, track your progress, and unlock AI-powered personalization.

← Browse all JavaScript quizzes