Posted about 4 years ago. Visible to the public.

Advanced JavaScript [3d]

Stepping forward from JavaScript Basics, the goal of this card is for you to be able to read and write more complex ES6+ and CoffeeScript code, and to migrate code from one language to another.



  • Read and understand the CoffeeScript documentation
  • Understand that CoffeeScript supports implicit returns (like Ruby)
    • Understand that those are not always helpful in JavaScript, especially for event handler functions.
  • Understand how loops and comprehensions work in CoffeeScript
  • Browsers don't understand CoffeeScript. Find the component in our stack that fixes this.




  • 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
    • Class Rectangle, has properties width and height. Offers area method 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 sum method 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)
    • Implement sum in ES5 as an IIFE
  • Find ways to test equality (what humans mean when they say "equal") for the following types.
    • String
    • Number
    • undefined
    • null
    • Array
    • Structured data structures consisting of nested objects, arrays and scalar variables
  • Discuss with our mentor:
    • Now that you have written some JavaScript and Ruby, which one do you like better? Can you point to concrete examples why you think that way?
    • What can tools like CoffeeScript or Lodash.js do to "fix" JavaScript? What can't they fix?

Owner of this card:

Arne Hartherz
Last edit:
19 days ago
by Hannes Randow
Posted by Arne Hartherz to makandra Curriculum
This website uses cookies to improve usability and analyze traffic.
Accept or learn more