summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/cacheir/spread-minmax-5.js
blob: a787f16783e126ae4b0d34028c8bb47d22144cd5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
function f() {
    var arr = [[]];
    for (var i = 1; i < 101; i++) {
        arr[0].push(i);
    }
    var res = 0;
    for (var i = 0; i < 100; i++) {
        res += Math.max(...arr[0]) + Math.min(...arr[0]);
    }
    assertEq(res, 10100);
}
f();