Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
19
rated 0 times [  26] [ 7]  / answers: 1 / hits: 44852  / 11 Years ago, mon, october 28, 2013, 12:00:00

Is Node.js supporting => function keyword alias already? If yes, starting from which version? How to enable this language extension?



(function() { console.log('it works!') })()


Becomes



(() => { console.log('it works!') })()

More From » node.js

 Answers
12

You can follow this issue: https://code.google.com/p/v8/issues/detail?id=2700



Currently (as 02.05.2014) arrow functions have been implemented and waiting until this functionality will be landed in v8: https://codereview.chromium.org/160073006/



After then we'll need to wait, until v8 version with arrow function would be integrated into Node.JS. You can follow Node.JS changelog there: https://github.com/joyent/node/blob/master/ChangeLog (search for v8: upgrade to ....)


[#74665] Monday, October 28, 2013, 11 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
leannjaidynd

Total Points: 111
Total Questions: 100
Total Answers: 94

Location: Slovenia
Member since Wed, Apr 6, 2022
2 Years ago
;