Exactly what Alexander said. In addition let and var can be used. It is most common preactice now to use let and const though. I will be digging deeper into the different types later in the blog series. For now though, const is used to create a variable that can not be changed. Var can be changed anywhere. Let can be changed in the Block scope of the function.
Thanks for your article!
Is there a difference between this
and this
or is the completely equivalent?
They are different. For example, "functions" have a "this" pointer. Fat arrow functions try to find "this" in the scope.
I try to avoid "funtions" whenever I can.
Thank you for replying!
Thank you!
Exactly what Alexander said. In addition let and var can be used. It is most common preactice now to use let and const though. I will be digging deeper into the different types later in the blog series. For now though, const is used to create a variable that can not be changed. Var can be changed anywhere. Let can be changed in the Block scope of the function.
Thanks!