Code exercises for mentoring JavaScript with jQuery
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Mentoring: jQuery code exercises

A collection of code exercises to use mentoring people in JavaScript using jQuery.

The principle behind these code exercises is to demonstrate what jquery can do, but also understand what jQuery is actually doing behind the scenes.

Collapsable Lists Exercises

  1. Create a collapsable list using pure jQuery
  2. Emulate jQuery's toggleClass() with hasClass(), addClass() and removeClass()
  3. Emulate jQuery's toggleClass() without using jQuery (pure DOM + Strings + regex)

TODO - build these code exercises

Fundamental JavaScript

  • Objects and Arrays
  • Square bracket notation and dot notation
  • object literals
  • global variables and namespaces
  • functions (function are objects too)
  • object detection
  • function scope
  • function references
  • callback / event-handler functions
  • 'this'
  • closures
  • classes and instances

Advanced JavaScript

  • class constructors
  • prototype chain
  • event bubbling and event capturing


  • Steve Marshall: for guidance in structuring the code exercises.