TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

An introduction to ES6 Part 3: Destructuring

24 pointsby timblairover 11 years ago

4 comments

teamnybleover 11 years ago
Combine this with arrow function syntax (which is already in Firefox):<p><pre><code> let square = x =&gt; 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_bover 11 years ago
I didn&#x27;t know js had a let statement.
评论 #6490648 未加载
redcircleover 11 years ago
Does anyone call it ES?
评论 #6488952 未加载
评论 #6491260 未加载