Understanding Value vs. Reference in JavaScript: Differences Between Primitives and Objects