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

Feedback on: JavaScript FAQ Knowledge Base Q535, June 14, 1999 at 08:47:04:

You are here: 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



©2018 Martin Webb