Earlier quoted context omitted.
React's hooks (and some JSX style things in general) are quite pernicious there because they essentially break JS: you can't use them inside an `if` or a `for` or a `while`, or even within another function. You're no longer writing Javascript, you're writing a restricted subset to avoid undefined behaviour. That alone is a concern, because any junior programmer getting an introduction through React is going to get a…
In some ways JS is an excellent first language- beyond its broad applicability, it has an extremely "average of all the others" set of features and primary syntaxes. An experienced JS programmer will be conceptually comfortable with Python and Ruby, syntactically comfortable with Java and C, etc. But in terms of the industry-standard practices/ecosystem, it is a terrible first language if you want to gain a generaliz…
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!