Home Articles FAQs XREF Games Software Instant Books About Feedback Search Site-Map
irt.org logo

Feedback on: JavaScript FAQ Knowledge Base Q535

irt.org | About | Feedback | 237 [ previous next ]

Feedback on:
JavaScript FAQ Knowledge Base Q535

Sent by
Conor McMenamin on June 14, 1999 at 08:47:04:

Worth:
Worth reading

Length:
Too short

Technical:
Not technical enough

Comments:
This approach provides potentially unexpected results for negative numbers. I'd be inclined to recommend using parseInt() rather than Math.floor; for -1.1 parseInt returns -1, Math.floor returns -2.

On the number stuff in general, the limits of your solutions would be worth mentioning; for instance your comma formatting suggestion doesn't work for negative numbers or non-integers.

Now let me say - excellent javascript resource, I'm finding it really useful.

Thanks,
Conor




Provide feedback ...
AddThis Social Bookmark Button

Provide feedback ... AddThis Social Bookmark Button


Last Updated: 21st December 2007. Maintained by: Martin Webb
irt.org liability, trademark, document use, privacy statement and software licensing rules apply.
Copyright © 1996-2008 irt.org, All Rights Reserved.