Really appreciate how you broke down the difference between primitive and reference types — that 'copying a reference vs copying a value' distinction trips up so many developers.
I've been building a financial tracking app (IndexedDB-based, runs entirely in the browser) and ran into a subtle bug where I was mutating an object I thought I'd cloned. Turned out I was just copying the reference. A simple structuredClone() fixed it, but it cost me hours of debugging.
Question: when you're teaching this concept, do you find students grasp it better with memory diagrams (boxes and arrows) or through live mutation examples in the console? Curious because I've seen both approaches and wonder which sticks better.