title: How to use Array.push and return the pushed item?
body: <p>I am calling <code>return someArr[someArr.push(newItem)-1];</code> and it does pretty what it should.</p>
  
  <p>Wondering is there a syntactic "sugar" for that <strong>extremely common</strong> operation? I wonder because returned new <code>length</code> is indeed more rarely needed, than actual constructed object (which caller definetely may want to polulate). Or is that made because it actually will return "a copy of an object", and my edits to its fields "will not survive" in actual tree?</p>
  
  <p>Just like a JS &lt;= 1.2 did: <code>return someArr.push(newItem);</code></p>
  
  <p>Just want to know - Is there are new "replacement" method, that I am unaware of?</p>
  
  <hr>
  
  <p>Also I had a minor subquestion <em>"does that return an 'independent' copy of an object or a 'reference' to actual object?"</em> but simple <a href="https://jsfiddle.net/patrob10114/4eyvbg29/" rel="nofollow noreferrer">fiddle</a> by <a href="https://stackoverflow.com/users/1541563/patrick-roberts">@PatricRoberts</a> just figured out that it is actually a reference (as it was expected), so I've credited him, for his assistance!</p>