JavaScript refuses to run the code below. Which statement correctly describes the problem?
const user = { id: 1, name: "Asha", role: "admin" };
const { ...details, id } = user;
console.log(id, details);
Rest means "everything else", so nothing may come after it. const { id, ...details } = user; is the fix.