I want the ability to do object destructuring on tuples and arrays in:
let statements
for loops
function parameters?
Examples:
remove the first element of the array and store it in "first" then take the remainder of the array and store it in "rest"
let [first, ...rest] = [1, 2, 3, 4]
when looping over hash maps you get a tuple of the key and the value, object destructuring will let you take it apart easily
I want the ability to do object destructuring on tuples and arrays in:
Examples:
remove the first element of the array and store it in "first" then take the remainder of the array and store it in "rest"
let [first, ...rest] = [1, 2, 3, 4]
when looping over hash maps you get a tuple of the key and the value, object destructuring will let you take it apart easily