Posted about 3 years ago. Visible to the public.

Advanced Javascript

Coffeescript

  • Read about Coffeescript:
  • What are some pros, what are some cons of using Coffeescript?
  • Browsers don't understand Coffeescript. Find the component in our stack that fixes this.
  • Find some larger piece of Javascript in the Cards or MovieDB repo and convert it to Coffeescript.
  • Open the Javascript code that was generated by the Coffeescript you just created. Can you understand the code that the Coffeescript compiler produced for you?
  • Google for coffeescript es6 and take in some of the drama. Understand the points of both sides.

Equality

How does equality work in Javascript? Explain the difference between:

  • Javascript's ==
  • Javascript's ===
  • Coffeescript's ==
  • Coffeescript's is
  • What humans mean when they say "equal"

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

Please 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 should understand the concepts and be able to implement it on your own.

Closures

Get a good understanding about what a "closure" is in Javascript. Here are some basics.

What can we use closures for? Some hints:

  • Explain in detail how this workaround for classes works under the hood.
  • Explain what a Immediately-Invoked Function Expression (IIFE) is in Javascript. Why do we use them?

Dealing with a broken language

  • 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:

Avatar
Henning Koch
Last edit:
almost 2 years ago
by Henning Koch
Posted by Henning Koch to makandra Curriculum
This website uses cookies to improve usability and analyze traffic.
Accept or learn more