0

How the answer is 50?

function func(a,b){ return a**b/b ;} alert(func(10,2)); //Ans:50

26th Jan 2023, 2:38 PM
Mohammad Tausiful Alam
Mohammad Tausiful Alam - avatar
5 Respostas
+ 6
** is the exponentiation operator: 10**2/2 == 10*10/2
26th Jan 2023, 2:45 PM
Lisa
Lisa - avatar
+ 2
Thank U. I thought it was a pointer😁
26th Jan 2023, 2:48 PM
Mohammad Tausiful Alam
Mohammad Tausiful Alam - avatar
0
*a is a pointer..... a** is exponential operator.... and hence (10**2)/2 == (10*10)/2
27th Jan 2023, 4:06 AM
Abhi_Raftaar
Abhi_Raftaar - avatar