Ngô Thị Vân
New member
What will be the output of the following JavaScript code?
A. 4.5
B. 4
C. 4.7
D. 5
Code:
<p id="demo"></p>
<script>
document.getElementById("demo").innerHTML = Math.floor(4.7);
</script>
B. 4
C. 4.7
D. 5