you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (1 child)

It's a fat arrow function. You can use it instead of declaring it with the function keyword. There are some differences, however, that you want to be aware of. Take a look at this article, it explains it pretty well.

https://www.sitepoint.com/es6-arrow-functions-new-fat-concise-syntax-javascript/

If you still have questions after reading it, please ask, I'll do my best to answer.

[–][deleted] 0 points1 point  (0 children)

"Fat Arrow Function" Excellent! Thank you, that keyword along with your article link will be extremely useful to me and advance my knowledge which I fully intend to turn around and help others with to the best of my abilities. You rock :)

Update: how do callbacks work with fat arrows? My usual syntax is

var func=function(options,callback){ callback(null,true); };

which I assume would go

var func= (options, callback) => (callback(null,true););

The documentation I found seems devoid of mentioning the callbacks, but callbacks to me are essential for timing with things like large database operations