Modify ↓
Ticket #10935 (closed bug: worksforme)
isNumeric return true on array with only one numeric value
| Reported by: | mengsoon | Owned by: | |
|---|---|---|---|
| Priority: | low | Milestone: | None |
| Component: | misc | Version: | 1.7.1 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
Change History
comment:1 Changed 18 months ago by sindresorhus
- Priority changed from undecided to low
- Status changed from new to open
- Component changed from unfiled to misc
comment:2 Changed 18 months ago by gibson042
Can we just update the isNumeric documentation to make it clear that what's being checked is the argument's String representation?
comment:3 Changed 18 months ago by rwaldron
- Status changed from open to closed
- Resolution set to worksforme
What is there to change? That behaviour is correct. http://es5.github.com/#x15.1.2.3
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.
Note: See
TracTickets for help on using
tickets.

Confirmed in Chrome 15 and Firefox 8.
This is because the isNumeric method is using parseFloat which is coercing the array into a number.