window.toggleMenu = function() {// code here}
const toggleMenu = function() {
if (menu.className === "nav__list") {
menu.classList.add("open");
} else {
menu.className = "nav__list";
}
};
document.querySelector(".hamburger").addEventListener("click", toggleMenu);
const deepClone = (obj) => {
let clone = {};
for (let prop in obj) {
if (typeof obj[prop] === 'object') {
clone[prop] = deepClone(obj[prop]);
} else {
clone[prop] = obj[prop];
}
}
return clone;
}