What will be the output of below Javascript function?

var result = Math.pow(8,2);

 Posted by Rajesh_Kumar on 2/17/2014 | Category: JavaScript Interview questions | Views: 2095 | Points: 40
Answer:

Output would be 64.

As it's 8 to the power of 2 meaning 8*8 = 64.

Because pow() method returns the value of base to the power of exponent.

Here, base = 8 and exponent = 2.


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response