title: Difference in memory usage when using objects vs primitive values as function arguments
body: <p>Whenever I only need one specific object property, I will pass that property to the function, but I've seen my colleagues passing the whole objects only to use 1 value. Intuitively I believe my way is better, but I'd like to really know if it's better purely from the point of memory management.</p>
  
  <pre><code>const largeObj = {...};
  
  dummyFn1(largeObj);
  dummyFn2(largeObj.name);
  </code></pre>
  
  <p>So in essence - is there any difference in memory allocation between these two functions?</p>