You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The idea is that the exported value in any module (file) is analogous to the return value of any function. The last expression of the file can be automatically exported. This allows for extremely terse modules such as:
// plusFive.js+(5)
The main advantage I see, aside from incentivizing the use of expressions, is that there is no syntax to be learned, and makes the "1 file = 1 module" identity stronger (unlike imperative exports).
The text was updated successfully, but these errors were encountered:
The idea is that the
export
ed value in any module (file) is analogous to the return value of any function. The last expression of the file can be automatically exported. This allows for extremely terse modules such as:The main advantage I see, aside from incentivizing the use of expressions, is that there is no syntax to be learned, and makes the "1 file = 1 module" identity stronger (unlike imperative exports).
The text was updated successfully, but these errors were encountered: