This is a review of some functional programming concepts in JavaScript for CS559.
Functional programming concepts (like closures) are extremely useful for graphics and user interface programming. The good news is that they are well supported in JavaScript. However, they are tricky to learn: students often need to see lots of examples before they make sense.
This workbook provides a quick tutorial that reviews the functional programming concepts in JavaScript. It tries to use examples that make it clear why they are useful for basic web programming (since this workbook comes before we do much graphics programming, it doesn't include graphics examples).
This workbook is optional. We will not collect it. We will not grade it. You can be pretty confident there will be questions about closures and other programming concepts on the exams.
Unlike regular workbooks, for this one you should clone the public repository you can do
git clone [email protected]:CS559/FunctionalTutorial.git
assuming you have ssh set up correctly (which you should for class).
You can then start a web server in that directory, and look at index.html
.
You can read this tutorial without cloning the repo at: https://cs559.github.io/FunctionalTutorial Cloning the repository will make it possible for you to edit the code and experiment.
Note: The repository "CS559/FunctionalTutorial" contains the "built workbook" (html). The workbook is actually written in Hugo. For staff who may need to edit the workbook, look elsewhere.