最佳答案
This recent video claims that EMCAScript 6 destructuring is already partially implemented in Node.JS. I have tried various examples (using v0.10.12 and the --harmony
flag), such as
var [a, b] = [1, 2];
and
var {a: a, b: b} = {a: 1, b: 2};
to no avail. This ticket seems to suggest that destructuring is not yet supported in V8.
Is destructuring really partially implemented in Node.JS? What are snippets of code I can play with?