> This is not correct. Arrow functions have the `this` value of the outer context.
You are correct, I wasn't clear. I was describing the end effect of free floating arrow functions VS an arrow function declared within a class.
When free floating, trying to access 'this' can (will) result in unexpected behavior, when inside a class arrow functions operate exactly as people expect a class member function to operate in other languages. (In contrast to having to otherwise bind JS functions to 'this')
In both cases the arrow function is acting the same way, but most intro to JS lessons don't explain it.
Indeed the way it was originally explained to me is that "arrow functions in classes auto bind to this" which is hilariously inaccurate, but the end effect is as if that was happening.
There is more than 2 now. :)
You have the keyword function, you have
const myFunc = (param) => { //body }
and then you have the various types that can occur within a class, which can have a little bit different behavior based on which syntax you use.
Fun times!
And remember, arrow functions within a class have a this, but arrow functions outside of a class don't have a this!