Trương Duy
New member
What will be the output of the following JavaScript code?
A. 8.70
B. 8.76
C. 8.00
D. Error
Code:
<p id="demo"></p>
<script>
function myFunction()
{
document.getElementById("demo").innerHTML = Math.trunc(8.76);
}
</script>
B. 8.76
C. 8.00
D. Error