How to perform Array/Object destructuring manually & efficiently? <p><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment" rel="nofollow">Array destructuring</a> is super useful:</p> <pre><code>var [a, b, c] = [1, 2, 8]; </code></pre> <p>It looks like it was <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/New_in_JavaScript/1.7#Destructuring_assignment_%28Merge_into_own_page.2Fsection%29" rel="nofollow">implemented into Javascript 1.7</a>, but then <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1083498" rel="nofollow">removed with bug 1083498</a>. Now according to <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment#Browser_compatibility" rel="nofollow">this table</a> it's not supported by any browser except Firefox! :(</p> <p>I wish I could use it because I don't like having to create an extra unnecessary variable. </p> <p>With destructuring:</p> <pre><code>var a, b, c; var input = "1 2 8"; [a, b, c] = arr.split(" "); </code></pre> <p>Without destructuring:</p> <pre><code>var a, b, c; var input = "1 2 8"; var inputArr = input.split(" "); a = inputArr[0]; b = inputArr[1]; c = inputArr[2]; </code></pre> <p>Is there a way to do this without the need to create the extra unneeded <code>inputArr</code> and draw from it multiple times?</p>