1 functiion f(x,n){ 2 if(n==1){ 3 return x; 4 }else { 5 return x*f(x,n-1); 6 } 7 } 8 alert(pow(2,3)); //8