Top 1K Features Creators Events Podcasts Books Extensions Interviews Blog Explorer CSV

Destructuring

< >
Example from 1 languages: JavaScript
const o = {p: 42, q: true}; const {p, q} = o;
Example from 1 languages: Reason
type person = {name: string, age: int}; let somePerson = {name: "Guy", age: 30}; let {name, age} = somePerson;
Example from 1 languages: Coconut
{"list": [0] + rest} = {"list": [0, 1, 2, 3]}
Example from 1 languages: bog
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, Reason, Coconut, bog, Bio

*

Languages without Destructuring include Lil

*

View all concepts with or missing a hasDestructuring measurement

*

Read more about Destructuring on the web: 1.

- Build the next great programming language Add Issues About Search Keywords Livestreams Labs Resources Acknowledgements