title: Javascript: moving elements in an array
body: <pre><code>var array = ["object1","object2","object3","object4","object5"];
  var copy = array.slice();
  copy.forEach(function(value) {
   if(value === "object3"){
    value = "newObject3"
  
   }
  });
  
  console.log(copy );
  </code></pre>
  
  <p>If i want to move <code>object3</code> in the array to the first index, after i assigned it a new value. How do I do it? and Whats the most effective and less time? any libraries like lodash can be used.</p>