Following is my script which I am trying to find solution for it. But I actually this function return round of ANS: 2. Eg. If input value is greater than 2.01 then result will be 3. I know round function is not help me to get this kind of answer. please help me to fix this issue.
<button onclick="myFunction()">Try it</button>
<p id="demo"></p>
<script>
function myFunction() {
document.getElementById("demo").innerHTML = Math.round(2.01);
}
</script>