Truncating Decimals into Integer
Hello,
I am currently using this script to truncate decimals into an integer:
event.value = event.value.toString().replace(/(^.*\.\d{0}).*$/,"$1");
This is a minor request, but how can I modify this script so that the decimal point does not appear at the end?
Example of current result: 36.
Example of desired result: 36
Any other guidance for formatting script to "drop" decimals is also appreciated! Thank you in advance.
