4 ms·
Fantastic work! It is exciting to see a project like this take off. I'm trying to dive in right now, and I noticed something interesting. Pardon my ignorance, b
by rheng 12y ago
Fantastic work! It is exciting to see a project like this take off. I'm trying to dive in right now, and I noticed something interesting. Pardon my ignorance, but can you explain what this is?
module.exports = { route, routes };
I got an error when I tried to do this:
var a = {1, 2};
What is it setting in that case, since there is no concept of tuples in javascript? It doesn't seem to be an array, dictionary, or function. Appreciate any advice!
- insin 12y agoIt's ES6 shorthand literal syntax [1], equivalent to: module.exports = { route: route, routes: routes }; [1] http://ariya.ofilabs.com/2013/02/es6-and-object-literal-property-value-shorthand.html http://ariya.ofilabs.com/2013/02/es6-and-object-literal-prop...
- rheng 12y agoThat explains a lot. Thank you!