Skip to content

Latest commit

 

History

History
34 lines (30 loc) · 2.52 KB

File metadata and controls

34 lines (30 loc) · 2.52 KB

Lesson 2 In-Class Exercises

(As before, we’re not expecting you to finish all of these activities! Pick the ones which are interesting and challenging to you, and feel free to work with the people around you.)

JavaScript Concepts:

  • Break into groups of ~4 members. Each member is in charge of finding out about a specific javascript concept and writing a small codepen that demonstrates it.
    • Come back together and give quick whiteboard talks about your concepts
    • Concepts:
      • First-Class and Higher Order Functions
      • Prototypes/Inheritance
      • Bind, Apply, Call
      • Closures

Event Listeners:

  • Much of Web development is learning to react to events, as a first foray Event Handling write a small codepen like this that creates a simple html element and responds to an event of your choice. A list of possible events is available here.

Functional Programming:

  • Part of the power of JavaScript is that it is supports imperative (like C), object oriented (like C++ or Java), and functional (like Fortran or Lisp) programming paradigms. Its likely you've run into the first two through previous software classes, but if you are new to functional programming now is a great time to get an introduction
  • Read one or more of the following (in increasing order of read time):
  • Use what you learned (do some of the following):
    • Discuss what you learned with a partner
    • Write two small codepens that do a simple task, such as displaying the current time. Write one in an object-oriented fashion, the other in a functional one.
    • Write a jsfiddle that uses JavaScripts functional tools like map() and reduce()

##Debugging Exercises

  • Try some or all of these exercises (Please fork the codepens before editing them)