0 votes
in JavaScript by

Which one of the following is correct output for the following given JavaScript code:

<p id="demo"></p>  

<script>  

function Function1()  

{  

document.getElementById("demo").innerHTML=Math.cbrt(792);  

}  

</script>  

a) 972

b) 81

c) 9

d) Error

1 Answer

0 votes
by

Answer: A

Reason: Here the code above uses the "cbrt ()" method, which returns the cube root of the number passed in parentheses as an argument. The "cbrt()" method is one of the several methods that are found in the library called math's available in the JavaScript.

...