| 1 |
// Copyright (C) 2014 the V8 project authors. All rights reserved. |
| 2 |
// This code is governed by the BSD license found in the LICENSE file. |
| 3 |
/*--- |
| 4 |
es6id: 14.2 |
| 5 |
description: > |
| 6 |
Syntax variations of valid Arrow Functions |
| 7 |
---*/ |
| 8 |
|
| 9 |
assert.sameValue((() => 1)(), 1); |
| 10 |
assert.sameValue((a => a + 1)(1), 2); |
| 11 |
assert.sameValue((() => { return 3; })(), 3); |
| 12 |
assert.sameValue((a => { return a + 3; })(1), 4); |
| 13 |
assert.sameValue(((a, b) => a + b)(1, 4), 5); |
| 14 |
assert.sameValue(((a, b) => { return a + b; })(1, 5), 6); |