how to remove value after decimal in javascript?

Remove value after decimal in javascript

Value:

var myFloat = 4.5;
var myTrunc = Math.trunc( myFloat );
document.write(myTrunc+ ” “);

Leave a Reply

Your email address will not be published. Required fields are marked *