So far in this chapter we’ve covered the architectural
object, its connections to the constructor function, how the
instanceof operator works, and so on. In
this section we switch gears and demonstrate a number of practical
classes. We begin with two nontrivial example classes that are
interesting in their own right but also serve as starting points for
the discussions that follow.
Example: A Set Class
Example 9-6. Set.js: An arbitrary set of values
// This is the constructor
// The properties of ...