What will be the output of the following JavaScript code? [code] <p id="demo"></p> <script> function myFunction() { var num = 13.3714;

What will be the output of the following JavaScript code?
Code:
<p id="demo"></p>
<script>
function myFunction() 
{
   var num = 13.3714;
   document.getElementById("demo").innerHTML = num.toPrecision(3);
}
</script>
A. 13
B. 13.3714
C. 13.3
D. 13.4
 

Tìm kiếm

Back
Top