Y
Hacker News
new
|
ask
|
show
|
jobs
by
jacobolus
2561 days ago
This coerces to a number, but not to an integer.
1 comments
reaktivo
2561 days ago
I would hate to see it in code that is being shared in a team, but the following works:
['1', '7', '11'].map(x => ~~x)
link
['1', '7', '11'].map(x => ~~x)