Some findings I wanted to share about skinny arrows & fat arrows:
- First take a look at the Coffeescript code on the right.
- This is an example of a simple class with 2 attributes (version, text) and 2 methods (getVersion, getText).
- I create an instance (called entry), pass the attributes and then I run its methods.
- Notice how 'version' gets back as undefined, but 'text' works.
- The only difference is in the nestedFunction. I used a skinny arrow inside getVersion, and a fat arrow inside getText.
I'm still trying to understand the how and why of this topic. This is my homework for this week, just wanted to share in case this reference helps someone else.