TE
TechEcho
Home
24h Top
Newest
Best
Ask
Show
Jobs
English
GitHub
Twitter
Home
An introduction to ES6 Part 3: Destructuring
24 points
by
timblair
over 11 years ago
4 comments
teamnyble
over 11 years ago
Collapse
Combine this with arrow function syntax (which is already in Firefox):<p><pre><code> let square = x => x * x </code></pre> And the next version of JavaScript is looking much more fun to work with!
评论 #6488763 未加载
Jasper_
over 11 years ago
It even works for argument lists too:<p><pre><code> function foo(a, { b: b, c: c }, [d, e]) { print (a, b, c, d, e); }</code></pre>
j_m_b
over 11 years ago
Collapse
I didn't know js had a let statement.
评论 #6490648 未加载
redcircle
over 11 years ago
Collapse
Does anyone call it ES?
评论 #6488952 未加载
评论 #6491260 未加载