10 questions · JavaScript · beginner level
What does this output?
const arr = [1, 2, 3] const result = arr.reduce((acc, val) => acc + val, 0) console.log(result)
Which method removes the LAST element and returns it?
const arr = [1, 2, 3] const last = arr._______ // last = 3, arr = [1, 2]
What is the output?
const a = [1, 2, 3] const b = a b.push(4) console.log(a)