Khan.randRange(2, 10) Math.pow(2, n)

Consider the following function:

public int result(int n) {
  if(n == 1)
    return 2;
  else
    return 2 * result(n-1);
}

What value does result(n) return?
(Either write a number, or write "infinite recursion".)

ANS

2 is multiplied by itself n times. In other words the result is 2^n.