What will be the output of the following JavaScript code? [code] <p id="demo"></p> <script> var x = 9.656; document.getElementById("demo").inner

What will be the output of the following JavaScript code?
Code:
<p id="demo"></p>
<script>
var x = 9.656;
document.getElementById("demo").innerHTML =
  x.toFixed(0)
</script>
A. 10
B. 9.65
C. 9.6
D. 9.656
 

Tìm kiếm

Back
Top