What value will be printed after executing the following-02262
This subjective question is related to the book/course vu mth302 Business Mathematics & Statistics. It can also be found in vu mth302 Mid Term Solved Past Paper No. 2.
Question 1: What value will be printed after executing the following statement in JavaScript:
document.write( Math.pow(3, 2) );
Math.pow( 3, 2 ); // returns 9 (3 * 3)
document.write( Math.pow(3, 2) );
Answer:
In this function math which is object describe the method of pow and 3, 2 are the arguments of object to method. So if we printed after executing the above statement in JavaScript than resulted value will be 9
--OR-- Math.pow(base, power)Math.pow( 3, 2 ); // returns 9 (3 * 3)