summaryrefslogtreecommitdiffstats
path: root/third_party/webkit/PerformanceTests/six-speed/tests/destructuring.es6
blob: 50e9b75bb3d32551038e68800f6363ff26544d4a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
var data = {
  a: 'foo',
  b: {c: 'd'},
  arr: [1, 2, 3]
};

function fn() {
  var {a, b:{c:b}, arr:[, c]} = data;
  return c;
}

assertEqual(fn(), 2);
test(fn);