const o = {p: 42, q: true};
const {p, q} = o;
type person = {name: string, age: int};
let somePerson = {name: "Guy", age: 30};
let {name, age} = somePerson;
{"list": [0] + rest} = {"list": [0, 1, 2, 3]}
let add = fn ((a,b)) a + b
let tuplify = fn (a,b) (a,b)
return add(tuplify(1,2)) # 3
Languages with Destructuring include JavaScript, TypeScript, Reason, Coconut, bog
This question asks: Does the language have a syntax for conveniently extracting multiple values from a structure?
Read more about Destructuring on the web: 1.
HTML of this page generated by Features.ts