Freecodecamp: Arrow functions throw warning but work correctly in code editor

Created on 6 Feb 2016  ·  3Comments  ·  Source: freeCodeCamp/freeCodeCamp

When using arrow functions in the code editor you revive a warning:

'arrow functions syntax (=>)' is only available in ES6 ('use esversion: 6').

However they work correctly with no issues.

Most helpful comment

If your browser does support ES6 you can add this to the top of your code to disable the warnings.
//jshint esversion: 6

All 3 comments

FCC recommends campers to use ES5-syntax until the browser support for ES6 is better (which it most likely will be later this year). ES6 Implementation status

This is to minimize confusion for new developers and let them focus on the core concepts instead of cutting-edge syntax and features.

Happy coding!

If your browser does support ES6 you can add this to the top of your code to disable the warnings.
//jshint esversion: 6

@sludge256 Thanks!

Was this page helpful?
0 / 5 - 0 ratings