summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/jaeger/inline/scripted-03.js
blob: f54c1c66da1c1e2e004a46c32d8c47dfef44b6af (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
function choose(x, y, z) {
  return x ? y : z;
}

function foo(x, y, z) {
  var a = 0;
  for (var i = 0; i < 100; i++) {
    a += choose(x, y, z);
  }
  return a;
}

var q = foo(true, 10, 0);
assertEq(q, 1000);