Loading…
A short voice session: one question, one follow-up, then instant feedback — up to 5 minutes.
push appends items and returns the new length. pop removes and returns the last item. Both mutate the array.
Starting with const items = ["a"], items.push("b") changes it to ["a", "b"] and returns 2. items.pop() then returns "b" and leaves ["a"]. pop on an empty array returns undefined. const prevents reassignment of items, but these mutations remain allowed.