I want to swap the key/value content of Jacob with the key/value content of Guillermo
I was able to swap Guillermo to Jacob but not the other way around.
This is my code which is only half correct:
let students = {
jacob: {
classes: ["math", "chemistry", "english"],
grade: 11,
age: 16,
},
guillermo: {
classes: ["history", "math", "physics"],
grade: 12,
age: 17,
},
};
let temp = students.jacob;
students.guillermo = temp;
let temp1 = students.guillermo;
students.jacob = temp1;
console.log(students)