Skip to content
RED SAGSkills
medium10 pts · first answer countsjavascriptarrays

slice versus splice

What does this print?

const a = [1, 2, 3, 4]
const x = a.slice(1, 3)
const y = a.splice(1, 2)
console.log(x, y, a)
Choose one answer

Discussion 0

Join free to post in the discussion.

Related questions