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