| 1 |
// Copyright 2015 Microsoft Corporation. All rights reserved. |
| 2 |
// This code is governed by the license found in the LICENSE file. |
| 3 |
|
| 4 |
/*--- |
| 5 |
description: > |
| 6 |
Object properties are assigned to target in ascending index order, |
| 7 |
i.e. a later assignment to the same property overrides an earlier assignment. |
| 8 |
es6id: 19.1.2.1 |
| 9 |
---*/ |
| 10 |
|
| 11 |
var target = { |
| 12 |
a: 1 |
| 13 |
}; |
| 14 |
var result = Object.assign(target, { |
| 15 |
a: 2 |
| 16 |
}, { |
| 17 |
a: "c" |
| 18 |
}); |
| 19 |
|
| 20 |
assert.sameValue(result.a, "c", "The value should be 'c'."); |