summaryrefslogtreecommitdiff
path: root/src/dstr-assignment/array-elem-target-identifier.case
blob: c45bbc8ac6a9ce5caa6418a10be47815684005bd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// Copyright (C) 2015 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/*---
desc: >
    Identifiers that appear as the DestructuringAssignmentTarget in an
    AssignmentElement should take on the iterated value corresponding to their
    position in the ArrayAssignmentPattern.
template: default
es6id: 12.14.5.3
---*/

//- setup
var x, y, z;
//- elems
[x, y, z]
//- vals
[1, 2, 3]
//- body
assert.sameValue(x, 1);
assert.sameValue(y, 2);
assert.sameValue(z, 3);