0
How the answer is 50?
function func(a,b){ return a**b/b ;} alert(func(10,2)); //Ans:50
5 Answers
+ 6
** is the exponentiation operator:
10**2/2 == 10*10/2
+ 2
Thank U. I thought it was a pointer😁
+ 2
Javascript don't give you direct access to memory location, In other word there's nothing like explicit initialization of pointers.
exponential operator **: when used with numbers, it works just like the left value raised to power of the right. As you've described, it takes two operands to produce a single result
a ** b = c
This could be assumed as the raw version of Math.pow(a, b) function.
0
Lisa you're right... Made the necessary adjustment. I wasnt thinking straight Ig
0
*a is a pointer..... a** is exponential operator.... and hence (10**2)/2 == (10*10)/2