test262/test/language/expressions/assignment/destructuring/array-elem-init-simple-no-s...

21 lines
578 B
JavaScript
Raw Normal View History

2015-04-17 23:12:38 +02:00
// Copyright (C) 2015 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
description: >
Identifiers that appear as the DestructuringAssignmentTarget in an
AssignmentElement should take on the iterated value corresponding to their
position in the ArrayAssignmentPattern.
es6id: 12.14.5.3
flags: [noStrict]
---*/
var value = [];
var result, argument, eval;
result = [arguments = 4, eval = 5] = value;
assert.sameValue(result, value);
assert.sameValue(arguments, 4);
assert.sameValue(eval, 5);