While we don't use CoffeeScript in new projects any more, we require you to understand it enough to work on existing projects that use it.
- Understand what modules are and what export and import do.
- Watch smb://nas.makandra.de/makandra_daten/Videos/Vorträge_Inhouse/2017_09_21_Henning_AsyncJS
- Read about Promise
- Read about async / await.
- We broke with CoffeeScript before their switch to version 2
- Understand that version 1 transpiled to ES5 while version 2 transpiled to ES6+
- Realize that the current CoffeeScript documentation is not about version 1
- Understand some key aspects that you will find in code of existing projects
- Understand the section about Lexical Scoping and Variable Safety
- Understand how loops and comprehensions work in CoffeeScript.
- Understand CoffeeScript's operators.
- Revisit CoffeeScript classes.
- Learn about destructuring.
- Understand the difference between
=>when defining functions. Use the "Try CoffeeScript" web console to play around with this.
- Browsers don't understand CoffeeScript. Find the component in our stack that fixes this.
- Understand how different values compare via
- Understand how CoffeeScript's
ismap to those
- Understand the benefit of LoDash's
- Understand in detail how a simple workaround for classes in ES5 works under the hood.
- Understand the reason for Immediately-Invoked Function Expression (IIFE) and the problem it solves.
- Important: For the following excercies, don't simply use a library or Stackoverflow code for this. You can look at other people's code to see how it works, but you must understand the concepts and be able to implement them on your own.
- Write a simple class
Rectangle, has properties
areamethod that returns the product of width and height.
- Implement it in CoffeeScript.
- Implement it in ES6.
- Compare the transpiled ES5 output of both. Note their class boilerplates.
- Manually convert the ES6 class to ES5 using the module pattern.
- Write a
summethod that takes an arbitrary number of arguments ("rest args") and computes their sum.
- Implement it in ES6, CoffeeScript, and ES5 separately (without using a transpiler)
sumin ES5 as an IIFE
- Find ways to test equality (what humans mean when they say "equal") for the following types.
- Structured data structures consisting of nested objects, arrays and scalar variables
- Discuss with our mentor: