Jump to content

Format a decimal number to an Integer


Tusk
 Share

Recommended Posts

I want to use a result for furtherer calculations but only want the whole number and not the decimal portion. In Excel there is a function "=INT(A1)" this ignores the decimal values in cell "A1", e.g. if call "A1=5.345"and I use the following function in cell "A2" "=INT(A1)*3" I get the result "15"How do I do this in JavaScript ?Thanks

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...