Chapter 6. Types

The class system we've been studying is one half of a pair of systems that MooTools implements. The other half, the MooTools type system, is very similar to the class system, but it focuses more on data as values and the various forms that values take.

Unlike the native object implementation and classes we discussed in separate chapters, the native JavaScript type system and the MooTools type system will both be tackled in this chapter. The two type systems are deeply intertwined, and discussing them separately wouldn't really aid our understanding of their similarities and differences.

With that in mind, let's talk about types.

Values and Type Systems

At the heart of programming is the manipulation of data. Whether we're writing ...

Get Pro JavaScript with MooTools: Learning Advanced JavaScript Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.