Given “/users/:id”, what’s the right JS approach to generate a function `foo` such that `foo({id: 42})` produces the string “/users/42”?
Good point! After sleeping on it, I realized I could probably close over the stuff I needed. Is there a benefit to “compiling”?
-
-
I guess it could be faster, on the other hand you open yourself up to code injection attacks. Probably not worth it.
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.