blob: 714192d12c0ed14a755ef3ee31893ed14d8b8c04 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
function f_arginc(a) {
var b = a++;
var c = b+b+b+b+b+b+b+b+b+b;
return a + c;
}
assertEq(f_arginc(1), 12)
function f_argdec(a) {
var b = a--;
var c = b+b+b+b+b+b+b+b+b+b;
return a + c;
}
assertEq(f_argdec(1), 10)
function f_incarg(a) {
var b = ++a;
var c = b+b+b+b+b+b+b+b+b+b;
return a + c;
}
assertEq(f_incarg(1), 22)
function f_decarg(a) {
var b = --a;
var c = b+b+b+b+b+b+b+b+b+b;
return a + c;
}
assertEq(f_decarg(1), 0)
|