@avibryant funny, a while back I actually wrote my own map that did exactly this. Nice to know that even my bad ideas aren't original.
-
-
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
@avibryant More or less#wtfjs that ['10','10','10','10','10'].map(function (n) { return parseInt(n, 10); }) returns what you'd expect? - 1 more reply
New conversation -
-
-
@avibryant That's just misunderstanding the API. What does parseInt's second parameter do? What does map give as a second parameter? ^_^Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
@avibryant@Gilad_Bracha I thought we all gave up on numbers in JavaScript last year.Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
@avibryant@zedshaw That’s “The Madness of King JavaScript”https://github.com/raganwald/homoiconic/blob/master/2013/01/madness.md …Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
@avibryant@AkitaOnRails need to the read the post later, though. :)Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
@avibryant@AkitaOnRails in the end, you end up with `parseInt(’10’, 0); parseInt(’10’, 1); parseInt(’10’, 2);`, ….Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
@avibryant@AkitaOnRails there’s no wtf. map passes the index as second argument, which is the base on the parseInt.Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
@avibryant and javascript is supposed to be the one language to rule all nowadays? These things are why I don't buy into hype.Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
@avibryant it's the radix value...Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.