title: Clone object in JavaScript
body: <p>Consider the below code or check this <a href="http://jsfiddle.net/webfriend13/JZBqC/" rel="noreferrer">fiddle</a>.</p>
  
  <pre><code>var obj = {
      name: "abc",
      age: 20
  }
  
  var objTwo;
  
  console.log(obj.age);
  objTwo = obj;
  objTwo.age = 10;
  console.log(obj.age);
  </code></pre>
  
  <p>I have created an object with name obj and it has two properties. Now I assign obj to another object named objTwo. Now I update one of the properties in objTwo. The same change is reflecting on obj as well. <strong>How can I assign values from one object to another without creating reference?</strong></p>