-2

Has anyone come across something like this const foo = (var1, var2) => bar in JS. I was going through someone else's code and came across something like this, not sure what this code does exactly but the line that precedes this is a declaration for bar let bar;. Does anyone have any ideas what this means

1 Answers1

-1

https://www.w3schools.com/js/js_arrow_function.asp

its for arrow functions, so you can write shorter function syntax