13 November 2019

how to remove value after decimal in javascript?

Remove value after decimal in javascript


<!DOCTYPE html>
<html>
<body>
<p>Value:</p>
<script>
var myFloat = 4.5;
var myTrunc = Math.trunc( myFloat );
document.write(myTrunc+ " ");
</script>
</body>
</html>

No comments:

Post a Comment

How to run google search console request submission by UI vision IDE automate?

 Run google search console request submission by UI vision IDE automate? Source View --- Json Code {   "Name": "DemoCsvReadAr...