CodePeekFree · no signup

Which array changes?

Three snippets. Predict the output, then trace it.

YOUR ARRAY CHECKQuestion 1 of 3

slice vs splice

What does this JavaScript print? Each output line is a separate console.log call.

const letters = ["a", "b", "c"];
console.log(letters.slice(1).join(""));
letters.splice(1, 1);
console.log(letters.join(""));
Choose the output

Continue free practice on CodePeek ↗Opens in a new tab

No signup. These three questions reuse the free starter set. Quiz answers stay on this page only; your saved puzzle progress is unchanged. Fixed examples, not a code runner. Website-visit and performance measurement still apply. Privacy & data.