Track 4
Paradigms
Different styles of structuring programs: objects and classes, functional programming, and closures.
3 pages. Read them in order: later pages build on earlier ones.
- 4.1Objects and classesAn object bundles data with the functions that work on it; a class is the blueprint for making objects.
- 4.2Functional programmingA style that builds programs from pure functions, avoids changing data in place, and passes functions around like values.
- 4.3ClosuresA function that remembers the variables around where it was created, even after that code has finished running.