title: How to loop all properties from object passed as parameter and change their values?
body: <p>I'm passing in an object like:</p>
  
  <pre><code>obj = {a:1,b:2,c:3}
  </code></pre>
  
  <p>I am trying to change <code>1/2/3</code> to <code>changed</code></p>
  
  <p>Here is my code:</p>
  
  <pre><code>var func = function(change) {
    for (var property in change) {
      if (func.hasOwnProperty(property)) {
        change.property = "changed"
        return func
      }
    }
  }
  </code></pre>
  
  <p>Right now my output is giving me the original properties with no change.
  I tried returning <code>func</code> inside the if statement to see if this was a scope problem but no luck.</p>