Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap
irt.Org
#

Q629 How can I round a decimal number to a whole number (ie: 1.52=2)?

You are here: irt.org | FAQ | JavaScript | Number | Q629 [ previous next ]

Try:

<SCRIPT LANGUAGE="JavaScript"><!--
answer = Math.round(1.52);
//--></SCRIPT>

©2018 Martin Webb